1App::Prove::State(3) User Contributed Perl Documentation App::Prove::State(3)
2
3
4
6 App::Prove::State - State storage for the "prove" command.
7
9 Version 3.28
10
12 The "prove" command supports a "--state" option that instructs it to
13 store persistent state across runs. This module implements that state
14 and the operations that may be performed on it.
15
17 # Re-run failed tests
18 $ prove --state=failed,save -rbv
19
21 Class Methods
22 "new"
23
24 Accepts a hashref with the following key/value pairs:
25
26 · "store"
27
28 The filename of the data store holding the data that
29 App::Prove::State reads.
30
31 · "extensions" (optional)
32
33 The test name extensions. Defaults to ".t".
34
35 · "result_class" (optional)
36
37 The name of the "result_class". Defaults to
38 "App::Prove::State::Result".
39
40 "result_class"
41 Getter/setter for the name of the class used for tracking test results.
42 This class should either subclass from "App::Prove::State::Result" or
43 provide an identical interface.
44
45 "extensions"
46 Get or set the list of extensions that files must have in order to be
47 considered tests. Defaults to ['.t'].
48
49 "results"
50 Get the results of the last test run. Returns a "result_class()"
51 instance.
52
53 "commit"
54 Save the test results. Should be called after all tests have run.
55
56 Instance Methods
57 "apply_switch"
58
59 $self->apply_switch('failed,save');
60
61 Apply a list of switch options to the state, updating the internal
62 object state as a result. Nothing is returned.
63
64 Diagnostics:
65 - "Illegal state option: %s"
66
67 "last"
68 Run in the same order as last time
69
70 "failed"
71 Run only the failed tests from last time
72
73 "passed"
74 Run only the passed tests from last time
75
76 "all"
77 Run all tests in normal order
78
79 "hot"
80 Run the tests that most recently failed first
81
82 "todo"
83 Run the tests ordered by number of todos.
84
85 "slow"
86 Run the tests in slowest to fastest order.
87
88 "fast"
89 Run test tests in fastest to slowest order.
90
91 "new"
92 Run the tests in newest to oldest order.
93
94 "old"
95 Run the tests in oldest to newest order.
96
97 "save"
98 Save the state on exit.
99
100 "get_tests"
101
102 Given a list of args get the names of tests that should run
103
104 "observe_test"
105
106 Store the results of a test.
107
108 "save"
109
110 Write the state to a file.
111
112 "load"
113
114 Load the state from a file
115
116
117
118perl v5.16.3 2013-05-02 App::Prove::State(3)