#!/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); } }