Grokbase Groups Perl qa November 2005

On Tuesday 22 November 2005 01:10, 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:

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



Shlomi Fish

Shlomi Fish

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

Search Discussions

Discussion Posts


Follow ups

Related Discussions

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



site design / logo © 2021 Grokbase