Each .t file is an independent program. How do you share something with a file on disk?
You could convert each test program you want to run for every config file into a module that will be used by a test program that looks something like:
#!/usr/bin/perl use Test::More; use lib ...; my @configs = ...; my @test_modules = ...; my $num_tests = 0; for my $test_module (@test_modules) { require $test_module; $num_tests += $test_module->get_num_tests(); } plan tests => @configs * $num_tests; for my $config (@configs) { for my $test_module (@test_modules) { $test_module->run_tests($config); } }
In reply to Re: Tests strategies: sharing of resources
by ikegami
in thread Tests strategies: sharing of resources
by carcassonne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |