Test2::Harness::Job - Control over a running test file.
The job object is an abstract representation of a running test. It is responsible for starting the test using an Test2::Harness::Runner, managing the process with an Test2::Harness::Proc object, and delegating work to an Test2::Harness::Parser. The Test2::Harness object interacts directly with the Job object.
The job object is also responsible for sending Test2::Event::ProcessStart and Test2::Event::ProcessFinish events, as well as a few other events in the case of errors.
Note not all private methods have _ prefixes yet. If the method is not on this list assume it is private. Some additional methods may be documented later.
Get the test filename.
Get the job's ID as used/assigned by the harness.
Check if the job is done yet.
This sends the events to all listeners, it also records them for the final result object and all subtest result objects.
Get the Test2::Harness::Parser instance.
Get the Test2::Harness::Proc instance.
Start the job.
$j->start( runner => $runner, # The L<Test2::Harness::Runner> instance start_args => \@args, # Args passed into $runner->start parser_class => $parser, # Parser class to use. );
Run an iteration. This will return true if any events were generated, false otherwise. This is called in an event loop by the Test2::Harness object.
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
Copyright 2016 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
To install Test2::Harness, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test2::Harness
CPAN shell
perl -MCPAN -e shell install Test2::Harness
For more information on module installation, please visit the detailed CPAN module installation guide.