Test::SerialFork is a Perl module to run iterations of a test in different processes.
SYNOPSIS
use Test::More plan => 42;
use Test::SerialFork;
my $abc=serial_fork('abc','def','ghi');
ok(do_my_test($abc),'It works');
This module allows you to run multiple copies of the same test, specifying a different label for each copy. The label is made available to the test run, and will generally be used to modify its behaviour in some way. Each copy of the test will also be run in a seperate sub-process, to isolate each test run from system-wide changes made by previous runs.
The module exports a single function, serial_fork(), whose arguments are the labels which will be passed to the subsequent runs of the test. serial_fork() iterates over these labels, forking into two processes each time.
In the child process, serial_fork() essentially just returns the current label, and the remainder of the test program is run as normal. However, the parent process collects all of the child's output, and integrates it into the main status report generated by the test (test names have the current label prepended to make it clear which run produced each message).
Product's homepage
Requirements:
· Perl