NAME
Test2::Harness::Result - Representation of a complete test or subtest.
DESCRIPTION
This object is used to represent a complete test or subtest.
METHODS
- $filename = $r->file
-
Get the filename of the running test.
- $name = $r->name
-
Get the name of the file or subtest.
- $job_id = $r->job
-
Get the job id.
- $int = $r->nested
-
This will be 0 on the main result for a file. This will be 1 for a top-level subtest, 2 for nested, etc.
- $id = $r->is_subtest
-
Subtest id if this result represents a subtest. The ID is arbitrary and parser-specific.
- $id = $r->in_subtest
-
Subtest id if this result is inside a subtest. The ID is arbitrary and parser-specific.
- $int = $r->total
-
Number of facts that have incremented the test count.
- $int = $r->failed
-
Number of failures/errors seen.
- $ts = $r->start_time
-
Timestamp from object creation.
- $ts = $r->stop_time
-
Timestamp from when the test stopped.
- $exit = $r->exit
-
If the test is complete this will have the exit code. This is undefined while the test is running.
- $plans_ref = $r->plans
-
Get a list of all plans encountered. If this has more than 1 plan an error will be rendered and the test will be considered a failure.
- $facts_ref = $r->planning
-
Get a list of all facts that are involved in planning. This includes all plan facts, and all facts that increment the test count.
- $errors_ref = $r->plan_errors
-
Get a list of plan errors (IE Plan and test count do not match).
- $facts_ref = $r->facts
-
Get a list of all the facts that were seen.
- $r->stop($exit)
-
End the test, and provide the exit code.
- $bool = $r->passed
-
Check if the result is a pass.
- $r->bump_failed
-
Add to the number of failures.
- $r->add_facts(@facts)
- $r->add_fact($fact)
-
Used to add+process facts.
SOURCE
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
MAINTAINERS
AUTHORS
COPYRIGHT
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/