1Test::Able::Role::Meta:U:sCelrasCso(n3t)ributed Perl DocTuemsetn:t:aAtbiloen::Role::Meta::Class(3)
2
3
4

NAME

6       Test::Able::Role::Meta::Class - Main metarole
7

DESCRIPTION

9       This metarole gets applied to the Moose::Meta::Class metaclass objects
10       for all Test::Able objects.  This metarole also pulls in
11       Test::Able::Planner.
12

ATTRIBUTES

14       method_types
15           The names of the different types of test-related methods.  The
16           default set is startup, setup, test, teardown, and shutdown.
17
18       *_methods
19           The test-related method lists.  There will be one for each method
20           type.  The default set will be:
21
22           startup_methods setup_methods test_methods teardown_methods
23           shutdown_methods
24
25           These lists are what forms the basis of the test execution plan.
26
27           The lists themselves will be coerced into Test::Able::Method::Array
28           objects just for the convenience of overloading for hash access.
29           The elements of the lists will be
30           Test::Able::Role::Meta::Method-based method metaclass objects.
31
32       test_objects
33           The list of Test::Able::Object-based objects that the test runner
34           object will iterate through to make up the test run.
35
36       current_test_object
37           The test object that is currently being executed (or introspected).
38
39       current_test_method
40           The method metaclass object of the associated test method.  This is
41           only useful from within a setup or teardown method.  Its also
42           available in the test method itself but current_method() would be
43           exactly the same in a test method and its shorter to type.
44
45       current_method
46           The method metaclass object of the currently executing test-related
47           method.
48
49       test_runner_object
50           The test object that will be running the show.  It may itself be in
51           the test_objects list.  The run_tests() method sets this value to
52           its invocant.
53
54       dry_run
55           Setting this true will cause all test-related method execution to
56           be skipped.  This means things like method exception handling,
57           method plan handling, and Test::Builder integration will also not
58           happen.  One use of this could be to print out the execution plan.
59           The default is 0.
60
61       on_method_plan_fail
62           Determines what is done, if anything, when the observed method plan
63           doesn't match the expected method plan after the test-related
64           method runs.  If this attribute is not set then nothing special is
65           done.  Setting this to log or die will cause the failure to be
66           logged via log() or just died upon.  The default is log.
67
68       on_method_exception
69           Determines what is done, if anything, when an exception is thrown
70           within a test-related method.
71
72           If this attribute isn't set then the exception is simply rethrown.
73           This is the default.
74
75           If its set to "continue" then the exception will be silently
76           ignored.
77
78           And if set to "continue_at_level" the exception will also be
79           silently ignored and the test runner will skip over lower levels,
80           if there are any, of the test execution plan.  The levels are
81           defined as follows. The startup and shutdown methods are at the
82           first level.  The setup and teardown methods are the second level.
83           And test methods are the third and last level.  Or in visual form:
84
85            startup
86                setup
87                    test
88                teardown
89            shutdown
90
91           In addition, when this attribute is set to continue or
92           continue_at_level the exceptions will be recorded in the
93           method_exceptions attribute of the currently executing test object.
94
95           There is only one way to cause a fatal exception when this
96           attribute is set to continue or continue_at_level.  And that is to
97           throw a Test::Able::FatalException exception.
98
99       method_exceptions
100           List of exceptions that have occurred while inside a test-related
101           method in this test object.  Each element of the list is a hashref
102           that looks like this:
103
104            {
105                method    => $self->current_method,
106                exception => $exception,
107            }
108

METHODS

110       run_tests
111           The main test runner method.  Iterates over test_objects list
112           calling run_methods() to run through the test execution plan.
113
114           Manages test_runner_object, current_test_object, runner_plan, and
115           last_runner_plan along the way.
116
117       run_methods
118           Executes a test-related method list as part of the test execution
119           plan.  Takes one argument and that's the name of the test-related
120           method type.  Also, for each test method, it calls run_methods()
121           for the setup and teardown method lists.
122
123       build_methods
124           Builds a test-related method list from the method metaclass objects
125           associated with this metaclass object.  The method list is sorted
126           alphabetically by method name.  Takes one argument and that's the
127           name of the test-related method type.
128
129       build_all_methods
130           Convenience method to call build_methods() for all method types.
131
132       clear_all_methods
133           Convenience method to clear all the test-related method lists out.
134
135       log All logging goes through this method.  It sends its args along to
136           Test::Builder::diag.  And only if $ENV{TEST_VERBOSE} is set.
137
138       clear_plan
139           Special purpose plan clearer that dumps the test object's plan and
140           the test runner's plan in one shot.
141

AUTHOR

143       Justin DeVuyst, "justin@devuyst.com"
144
146       Copyright 2009 by Justin DeVuyst.
147
148       This library is free software, you can redistribute it and/or modify it
149       under the same terms as Perl itself.
150
151
152
153perl v5.30.1                      2020-01-30  Test::Able::Role::Meta::Class(3)
Impressum