Re: [Perlunit-users] running individual tests from the command line
Status: Beta
Brought to you by:
mca1001
From: Andrey A. <aa...@ma...> - 2006-06-07 13:48:07
|
RD> I've created a script much like TkRunner.pl, TestRunner etc, to run RD> individual test suites. Is there a way I can run an individual test RD> from within a test-suite in a similar manner? I have commented out string # our @TESTS = qw(); in every test unit. If I need to run individual test I put it in array and uncomment. It's not so convinient but it works. Also I have a reminder in TestSuite to be sure to run whole suite afterwards: === opendir(DIR, './tu') or die $!; @tests = grep { /(?<!AllTests)\.pm$/ } readdir(DIR); closedir(DIR); foreach my $tfile (@tests){ open(F, '<', "./tu/$tfile") or die $!; my ($our_tests) = grep { m/our\s+\@TESTS/ } <F>; close(F); die "Explicit test list found in $tfile\n" if $our_tests and $our_tests !~ /^\s*#/; } === Andrey. |