1Test::Run::Straps_GplArUts(e3r)Contributed Perl DocumentTaetsito:n:Run::Straps_GplArt(3)
2
3
4

NAME

6       Test::Run::Straps - detailed analysis of test results
7

WARNING

9       This module contains nothing but old (and possibly out of date)
10       documentation.  All the code-wise functionality was moved to the MIT
11       X11-licensed Test::Run::Straps and other modules.
12
13       Don't use this module, but you may wish to consult its documentation
14       for reference.
15

SYNOPSIS

17         use Test::Run::Straps;
18
19         my $strap = Test::Run::Straps->new;
20
21         # Various ways to interpret a test
22         my $results = $strap->analyze($name, \@test_output);
23         my $results = $strap->analyze_fh($name, $test_filehandle);
24         my $results = $strap->analyze_file($test_file);
25
26         # UNIMPLEMENTED
27         my %total = $strap->total_results;
28
29         # Altering the behavior of the strap  UNIMPLEMENTED
30         my $verbose_output = $strap->dump_verbose();
31         $strap->dump_verbose_fh($output_filehandle);
32

DESCRIPTION

34       THIS IS ALPHA SOFTWARE in that the interface is subject to change in
35       incompatible ways.  It is otherwise stable.
36
37       Test::Run is limited to printing out its results.  This makes analysis
38       of the test results difficult for anything but a human.  To make it
39       easier for programs to work with test results, we provide
40       Test::Run::Straps.  Instead of printing the results, straps provide
41       them as raw data.  You can also configure how the tests are to be run.
42
43       The interface is currently incomplete.  Please contact the author if
44       you'd like a feature added or something change or just have comments.
45

ANALYSIS

Parsing

48       Methods for identifying what sort of line you're looking at.
49

Results

51       The %results returned from "analyze()" contain the following
52       information:
53
54         passing           true if the whole test is considered a pass
55                           (or skipped), false if its a failure
56
57         exit              the exit code of the test run, if from a file
58         wait              the wait code of the test run, if from a file
59
60         max               total tests which should have been run
61         seen              total tests actually seen
62         skip_all          if the whole test was skipped, this will
63                             contain the reason.
64
65         ok                number of tests which passed
66                             (including todo and skips)
67
68         todo              number of todo tests seen
69         bonus             number of todo tests which
70                             unexpectedly passed
71
72         skip              number of tests skipped
73
74       So a successful test should have max == seen == ok.
75
76       There is one final item, the details.
77
78         details           an array ref reporting the result of
79                           each test looks like this:
80
81           $results{details}[$test_num - 1] =
82                   { ok          => is the test considered ok?
83                     actual_ok   => did it literally say 'ok'?
84                     name        => name of the test (if any)
85                     diagnostics => test diagnostics (if any)
86                     type        => 'skip' or 'todo' (if any)
87                     reason      => reason for the above (if any)
88                   };
89
90       Element 0 of the details is test #1.  I tried it with element 1 being
91       #1 and 0 being empty, this is less awkward.
92

EXAMPLES

94       See examples/mini_harness.plx for an example of use.
95

AUTHOR

97       Michael G Schwern "<schwern@pobox.com>", later maintained by Andy
98       Lester "<andy@petdance.com>".
99
100       Converted to Test::Run::Straps by Shlomi Fish,
101       <http://www.shlomifish.org/> .
102

LICENSE

104       This file is distributed under the same terms as perl. (GPL2 or Later +
105       Artistic 1).
106

SEE ALSO

108       Test::Run ,  Test::Run::Straps
109
110
111
112perl v5.34.0                      2021-07-23       Test::Run::Straps_GplArt(3)
Impressum