File: Tooling.pm

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (120 lines) | stat: -rw-r--r-- 2,528 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package Test2::Manual::Tooling;
use strict;
use warnings;

our $VERSION = '1.302210';

1;

__END__

=head1 NAME

Test2::Manual::Tooling - Manual page for tool authors.

=head1 DESCRIPTION

This section covers writing new tools, plugins, and other Test2 components.

=head1 TOOL TUTORIALS

=head2 FIRST TOOL

L<Test2::Manual::Tooling::FirstTool> - Introduction to writing tools by cloning
L<ok()>.

=head2 MOVING FROM Test::Builder

L<Test2::Manual::Tooling::TestBuilder> - This section maps Test::Builder
methods to Test2 concepts.

=head2 NESTING TOOLS

L<Test2::Manual::Tooling::Nesting> - How to call other tools from your tool.

=head2 TOOLS WITH SUBTESTS

L<Test2::Manual::Tooling::Subtest> - How write tools that make use of subtests.

=head2 TESTING YOUR TEST TOOLS

L<Test2::Manual::Tooling::Testing> - How to write tests for your test tools.

=head1 PLUGIN TUTORIALS

=head2 TAKING ACTION WHEN A NEW TOOL STARTS

L<Test2::Manual::Tooling::Plugin::ToolStarts> - How to add behaviors that occur
when a tool starts work.

=head2 TAKING ACTION AFTER A TOOL IS DONE

L<Test2::Manual::Tooling::Plugin::ToolCompletes> - How to add behaviors that
occur when a tool completes work.

=head2 TAKING ACTION AT THE END OF TESTING

L<Test2::Manual::Tooling::Plugin::TestingDone> - How to add behaviors that
occur when testing is complete (IE done_testing, or end of test).

=head2 TAKING ACTION JUST BEFORE EXIT

L<Test2::Manual::Tooling::Plugin::TestExit> - How to safely add pre-exit
behaviors.

=head1 WRITING A SIMPLE JSONL FORMATTER

L<Test2::Manual::Tooling::Formatter> - How to write a custom formatter, in our
case a JSONL formatter.

=head1 WHERE TO FIND HOOKS AND APIS

=over 4

=item global API

L<Test2::API> is the global API. This is primarily used by plugins that provide
global behavior.

=item In hubs

L<Test2::Hub> is the base class for all hubs. This is where hooks for
manipulating events, or running things at the end of testing live.

=back

=head1 SEE ALSO

L<Test2::Manual> - Primary index of the manual.

=head1 SOURCE

The source code repository for Test2-Manual can be found at
F<https://github.com/Test-More/test-more/>.

=head1 MAINTAINERS

=over 4

=item Chad Granum E<lt>exodist@cpan.orgE<gt>

=back

=head1 AUTHORS

=over 4

=item Chad Granum E<lt>exodist@cpan.orgE<gt>

=back

=head1 COPYRIGHT

Copyright Chad Granum E<lt>exodist@cpan.orgE<gt>.

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

See F<http://dev.perl.org/licenses/>

=cut