On Tuesday 22 November 2005 01:10, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Homepage: http://www.shlomifish.org/ 95% of the programmers consider 95% of the code they did not write, in the bottom 5%.