SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Fedora 28 perl-Test-Able-0.11-19.fc28.noarch.rpm

Test::Able::Role::Meta::Class

Section: User Contributed Perl Documentation (3)
Updated: 2018-02-09
Index 

NAME

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

DESCRIPTION

This metarole gets applied to the Moose::Meta::Class metaclass objectsfor all Test::Able objects. This metarole also pulls inTest::Able::Planner. 

ATTRIBUTES

method_types
The names of the different types of test-related methods.The default set is startup, setup, test, teardown, and shutdown.
*_methods
The test-related method lists. There will be one for each methodtype. The default set will be:

startup_methodssetup_methodstest_methodsteardown_methodsshutdown_methods

These lists are what forms the basis of the test execution plan.

The lists themselves will be coerced into Test::Able::Method::Array objectsjust for the convenience of overloading for hash access. The elements of thelists will be Test::Able::Role::Meta::Method-based method metaclassobjects.

test_objects
The list of Test::Able::Object-based objects that the test runnerobject will iterate through to make up the test run.
current_test_object
The test object that is currently being executed (or introspected).
current_test_method
The method metaclass object of the associated test method.This is only useful from within a setup or teardown method.Its also available in the test method itself but current_method()would be exactly the same in a test method and its shorter to type.
current_method
The method metaclass object of the currently executing test-relatedmethod.
test_runner_object
The test object that will be running the show. It may itself be in thetest_objects list. The run_tests() method sets this value to its invocant.
dry_run
Setting this true will cause all test-related method execution to be skipped.This means things like method exception handling, method plan handling, andTest::Builder integration will also not happen. One use of this could be toprint out the execution plan. The default is 0.
on_method_plan_fail
Determines what is done, if anything, when the observed method plan doesn'tmatch the expected method plan after the test-related method runs. If thisattribute is not set then nothing special is done. Setting this to log or diewill cause the failure to be logged via log() or just died upon. The defaultis log.
on_method_exception
Determines what is done, if anything, when an exception is thrown within atest-related method.

If this attribute isn't set then the exception is simply rethrown. This isthe default.

If its set to ``continue'' then the exception will be silently ignored.

And if set to ``continue_at_level'' the exception will also be silently ignoredand the test runner will skip over lower levels, if there are any, of the testexecution plan. The levels are defined as follows. The startup and shutdownmethods are at the first level. The setup and teardown methods are the secondlevel. And test methods are the third and last level. Or in visual form:

 startup     setup         test     teardown shutdown

In addition, when this attribute is set to continue or continue_at_level theexceptions will be recorded in the method_exceptions attribute of thecurrently executing test object.

There is only one way to cause a fatal exception when this attribute is set tocontinue or continue_at_level. And that is to throw aTest::Able::FatalException exception.

method_exceptions
List of exceptions that have occurred while inside a test-related method inthis test object. Each element of the list is a hashref that looks like this:

 {     method    => $self->current_method,     exception => $exception, }
 

METHODS

run_tests
The main test runner method. Iterates over test_objects list callingrun_methods() to run through the test execution plan.

Manages test_runner_object, current_test_object, runner_plan, andlast_runner_plan along the way.

run_methods
Executes a test-related method list as part of the test execution plan. Takesone argument and that's the name of the test-related method type. Also, foreach test method, it calls run_methods() for the setup and teardown methodlists.
build_methods
Builds a test-related method list from the method metaclass objects associatedwith this metaclass object. The method list is sorted alphabetically bymethod name. Takes one argument and that's the name of the test-relatedmethod type.
build_all_methods
Convenience method to call build_methods() for all method types.
clear_all_methods
Convenience method to clear all the test-related method lists out.
log
All logging goes through this method. It sends its args along toTest::Builder::diag. And only if $ENV{TEST_VERBOSE} is set.
clear_plan
Special purpose plan clearer that dumps the test object's plan and the testrunner's plan in one shot.
 

AUTHOR

Justin DeVuyst, "justinAATTdevuyst.com" 

COPYRIGHT AND LICENSE

Copyright 2009 by Justin DeVuyst.

This library is free software, you can redistribute it and/or modify it underthe same terms as Perl itself.


 

Index

NAME
DESCRIPTION
ATTRIBUTES
METHODS
AUTHOR
COPYRIGHT AND LICENSE

This document was created byman2html,using the manual pages.