1App::Prove::State::ResulPte(r3lpmP)rogrammers ReferenceApGpu:i:dPerove::State::Result(3pm)
2
3
4

NAME

6       App::Prove::State::Result - Individual test suite results.
7

VERSION

9       Version 3.17
10

DESCRIPTION

12       The "prove" command supports a "--state" option that instructs it to
13       store persistent state across runs. This module encapsulates the
14       results for a single test suite run.
15

SYNOPSIS

17           # Re-run failed tests
18           $ prove --state=fail,save -rbv
19

METHODS

21   Class Methods
22       "new"
23
24           my $result = App::Prove::State::Result->new({
25               generation => $generation,
26               tests      => \%tests,
27           });
28
29       Returns a new "App::Prove::State::Result" instance.
30
31   "state_version"
32       Returns the current version of state storage.
33
34   "test_class"
35       Returns the name of the class used for tracking individual tests.  This
36       class should either subclass from "App::Prove::State::Result::Test" or
37       provide an identical interface.
38
39       "generation"
40
41       Getter/setter for the "generation" of the test suite run. The first
42       generation is 1 (one) and subsequent generations are 2, 3, etc.
43
44       "last_run_time"
45
46       Getter/setter for the time of the test suite run.
47
48       "tests"
49
50       Returns the tests for a given generation. This is a hashref or a hash,
51       depending on context called. The keys to the hash are the individual
52       test names and the value is a hashref with various interesting values.
53       Each k/v pair might resemble something like this:
54
55        't/foo.t' => {
56           elapsed        => '0.0428488254547119',
57           gen            => '7',
58           last_pass_time => '1219328376.07815',
59           last_result    => '0',
60           last_run_time  => '1219328376.07815',
61           last_todo      => '0',
62           mtime          => '1191708862',
63           seq            => '192',
64           total_passes   => '6',
65         }
66
67       "test"
68
69        my $test = $result->test('t/customer/create.t');
70
71       Returns an individual "App::Prove::State::Result::Test" instance for
72       the given test name (usually the filename).  Will return a new
73       "App::Prove::State::Result::Test" instance if the name is not found.
74
75       "test_names"
76
77       Returns an list of test names, sorted by run order.
78
79       "remove"
80
81        $result->remove($test_name);            # remove the test
82        my $test = $result->test($test_name);   # fatal error
83
84       Removes a given test from results.  This is a no-op if the test name is
85       not found.
86
87       "num_tests"
88
89       Returns the number of tests for a given test suite result.
90
91       "raw"
92
93       Returns a hashref of raw results, suitable for serialization by YAML.
94
95
96
97perl v5.12.4                      2011-06-07    App::Prove::State::Result(3pm)
Impressum