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

Re: Suggestion regarding test suite design

Thread Previous | Thread Next
From:
David Golden
Date:
July 6, 2011 04:08
Subject:
Re: Suggestion regarding test suite design
Message ID:
CAOeq1c_C3NOjQ4P9Uh1sdxJ4XD4gLjVhReXvxamBGsC3sNFa=g@mail.gmail.com
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 | Thread Next


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