Grokbase Groups Perl qa November 2005
FAQ

On Tuesday 22 November 2005 01:10, mleiseca@gmail.com wrote:
Hi All,

I have been trying to find a way to combine the functionality of
Test::Harness with testing scripts that take a parameter.
Here is my situation: I am trying to test a database configuration for
one specific ID. This ID is essentially part of primary key for several
tables and we would like to make sure that the data in the tables
follows certain rules. Of course, the rules are rather complicated, so
I thought the tests could be written in perl.

Basically, the setup I am considering is as follows:
- There would be a directory of .t files that all test a different part
of the configuration
- All of the .t files would take the ID as an argument, so they could
be executed as
perl testfile.t SPECIFIC-ID
- I could use Test::Harness to run all these test files, passing the
specific ID in at runtime.
Why not generate seperate test files that will system() or exec() the real
test file by calling it with its ID?

For example:

t/test1.t
--> will have : system("t/Tests/real_test.t", "SPECIFIC-ID1");
t/test2.t
--> will have : system("t/Tests/real_test.t", "SPECIFIC-ID2");

Etc.

Regards,

Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish shlomif@iglu.org.il
Homepage: http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupqa @
categoriesperl
postedNov 21, '05 at 11:10p
activeNov 22, '05 at 2:59p
posts4
users3
websiteqa.perl.org

People

Translate

site design / logo © 2021 Grokbase