develooper Front page | perl.qa | Postings from July 2011

RE: Suggestion regarding test suite design

Thread Previous
From:
Murugesan Kandasamy
Date:
July 6, 2011 04:53
Subject:
RE: Suggestion regarding test suite design
Message ID:
90EFB839045E2A48976409BA1BCB681C509DB69E8B@vsind01sexc001.VentechSolutions.com
David, Thanks for your suggestion. Earlier, I had a different level of abstraction where I create all the test scenarios .t files during runtime with the two lines and executed them using runtests. After that I deleted the individual .t files. Its just for the breakdown of the test names with number of passed/failed results.

Regards,
Murugesan

-----Original Message-----
From: david@autopragmatic.com [mailto:david@autopragmatic.com] On Behalf Of David Golden
Sent: Wednesday, July 06, 2011 4:38 PM
To: Murugesan Kandasamy
Cc: perl-qa@perl.org
Subject: Re: Suggestion regarding test suite design

On Wed, Jul 6, 2011 at 6:01 AM, Murugesan Kandasamy <KMurugesan@ventechsolutions.com> wrote:
> I have hundreds of similar scenarios and they are getting executed well and working as expected with test harness. But my doubt is I am having hundreds of .t files just with two lines of code i.e. loading the module, calling the subroutine Load_and_execute with the xml file as input. Is it not just a repetition/code duplication? But I need a way to test the whole suite with multiple scenarios like this. Is any other way possible.

Maybe you need another level of abstraction.

Create a file that contains all your cases (what you would put in the two-line .t file) and then have one .t file iterate through that file, calling each case.

-- David

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About