1Apache::TestRun(3)    User Contributed Perl Documentation   Apache::TestRun(3)
2
3
4

NAME

6       Apache::TestRun - Run the test suite
7

SYNOPSIS

DESCRIPTION

10       The "Apache::TestRun" package controls the configuration and running of
11       the test suite.
12

METHODS

14       Several methods are sub-classable, if the default behavior should be
15       changed.
16
17   "bug_report"
18       The bug_report() method is executed when "t/TEST" was executed with the
19       "-bugreport" option, and "make test" (or "t/TEST") fail. Normally this
20       is callback which you can use to tell the user how to deal with the
21       problem, e.g. suggesting to read some document or email some details to
22       someone who can take care of it. By default nothing is executed.
23
24       The "-bugreport" option is needed so this feature won't become annoying
25       to developers themselves. It's automatically added to the "run_tests"
26       target in Makefile. So if you repeateadly have to test your code, just
27       don't use "make test" but run "t/TEST" directly. Here is an example of
28       a custom "t/TEST"
29
30         My::TestRun->new->run(@ARGV);
31
32         package My::TestRun;
33         use base 'Apache::TestRun';
34
35         sub bug_report {
36             my $self = shift;
37
38             print <<EOI;
39         +--------------------------------------------------------+
40         | Please file a bug report: http://perl.apache.org/bugs/ |
41         +--------------------------------------------------------+
42         EOI
43         }
44
45   "pre_configure"
46       The pre_configure() method is executed before the configuration for
47       "Apache::Test" is generated. So if you need to adjust the setup before
48       httpd.conf and other files are autogenerated, this is the right place
49       to do so.
50
51       For example if you don't want to inherit a LoadModule directive for
52       mod_apreq.so but to make sure that the local version is used, you can
53       sub-class "Apache::TestRun" and override this method in t/TEST.PL:
54
55         package My::TestRun;
56         use base 'Apache::TestRun';
57         use Apache::TestConfig;
58         __PACKAGE__->new->run(@ARGV);
59
60         sub pre_configure {
61             my $self = shift;
62             # Don't load an installed mod_apreq
63             Apache::TestConfig::autoconfig_skip_module_add('mod_apreq.c');
64
65             $self->SUPER::pre_configure();
66         }
67
68       Notice that the extension is .c, and not .so.
69
70       Don't forget to run the super class' c<pre_configure()> method.
71
72   "new_test_config"
73       META: to be completed
74
75
76
77perl v5.36.0                      2023-01-19                Apache::TestRun(3)
Impressum