xref: /minix3/external/bsd/atf/dist/tools/atf-report.1 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"
2*0a6a1f1dSLionel Sambuc.\" Automated Testing Framework (atf)
3*0a6a1f1dSLionel Sambuc.\"
4*0a6a1f1dSLionel Sambuc.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
5*0a6a1f1dSLionel Sambuc.\" All rights reserved.
6*0a6a1f1dSLionel Sambuc.\"
7*0a6a1f1dSLionel Sambuc.\" Redistribution and use in source and binary forms, with or without
8*0a6a1f1dSLionel Sambuc.\" modification, are permitted provided that the following conditions
9*0a6a1f1dSLionel Sambuc.\" are met:
10*0a6a1f1dSLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright
11*0a6a1f1dSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer.
12*0a6a1f1dSLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright
13*0a6a1f1dSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer in the
14*0a6a1f1dSLionel Sambuc.\"    documentation and/or other materials provided with the distribution.
15*0a6a1f1dSLionel Sambuc.\"
16*0a6a1f1dSLionel Sambuc.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17*0a6a1f1dSLionel Sambuc.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18*0a6a1f1dSLionel Sambuc.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19*0a6a1f1dSLionel Sambuc.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20*0a6a1f1dSLionel Sambuc.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21*0a6a1f1dSLionel Sambuc.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*0a6a1f1dSLionel Sambuc.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23*0a6a1f1dSLionel Sambuc.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*0a6a1f1dSLionel Sambuc.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25*0a6a1f1dSLionel Sambuc.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26*0a6a1f1dSLionel Sambuc.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27*0a6a1f1dSLionel Sambuc.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*0a6a1f1dSLionel Sambuc.\"
29*0a6a1f1dSLionel Sambuc.Dd December 16, 2011
30*0a6a1f1dSLionel Sambuc.Dt ATF-REPORT 1
31*0a6a1f1dSLionel Sambuc.Os
32*0a6a1f1dSLionel Sambuc.Sh NAME
33*0a6a1f1dSLionel Sambuc.Nm atf-report
34*0a6a1f1dSLionel Sambuc.Nd transforms the output of atf-run to different formats
35*0a6a1f1dSLionel Sambuc.Sh SYNOPSIS
36*0a6a1f1dSLionel Sambuc.Nm
37*0a6a1f1dSLionel Sambuc.Op Fl o Ar fmt1:path1 Op .. Fl o Ar fmtN:pathN
38*0a6a1f1dSLionel Sambuc.Nm
39*0a6a1f1dSLionel Sambuc.Fl h
40*0a6a1f1dSLionel Sambuc.Sh DESCRIPTION
41*0a6a1f1dSLionel Sambuc.Nm
42*0a6a1f1dSLionel Sambucreads the output of
43*0a6a1f1dSLionel Sambuc.Nm atf-run
44*0a6a1f1dSLionel Sambucand transforms it to different formats.
45*0a6a1f1dSLionel SambucSome of these are user-friendly and others are machine-parseable, which
46*0a6a1f1dSLionel Sambucopens a wide range of possibilities to analyze the results of a test
47*0a6a1f1dSLionel Sambucsuite's execution.
48*0a6a1f1dSLionel SambucSee
49*0a6a1f1dSLionel Sambuc.Sx Output formats
50*0a6a1f1dSLionel Sambucbelow for more details on which these formats are.
51*0a6a1f1dSLionel Sambuc.Pp
52*0a6a1f1dSLionel SambucIn the first synopsis form,
53*0a6a1f1dSLionel Sambuc.Nm
54*0a6a1f1dSLionel Sambucreads the output of
55*0a6a1f1dSLionel Sambuc.Nm atf-run
56*0a6a1f1dSLionel Sambucthrough its standard input and, if no
57*0a6a1f1dSLionel Sambuc.Fl o
58*0a6a1f1dSLionel Sambucoptions are given, prints a user-friendly report on its standard
59*0a6a1f1dSLionel Sambucoutput using the
60*0a6a1f1dSLionel Sambuc.Sq ticker
61*0a6a1f1dSLionel Sambucformat.
62*0a6a1f1dSLionel SambucIf
63*0a6a1f1dSLionel Sambuc.Fl o
64*0a6a1f1dSLionel Sambucoptions are provided (more than one are allowed), they specify the complete
65*0a6a1f1dSLionel Sambuclist of reports to generate.
66*0a6a1f1dSLionel SambucThey are all generated simultaneously, and for obvious reasons, two reports
67*0a6a1f1dSLionel Sambuccannot be written to the same file.
68*0a6a1f1dSLionel SambucNote that the default output is suppressed when
69*0a6a1f1dSLionel Sambuc.Fl o
70*0a6a1f1dSLionel Sambucis provided.
71*0a6a1f1dSLionel Sambuc.Pp
72*0a6a1f1dSLionel SambucIn the second synopsis form,
73*0a6a1f1dSLionel Sambuc.Nm
74*0a6a1f1dSLionel Sambucwill print information about all supported options and their purpose.
75*0a6a1f1dSLionel Sambuc.Pp
76*0a6a1f1dSLionel SambucThe following options are available:
77*0a6a1f1dSLionel Sambuc.Bl -tag -width XoXfmtXpathXX
78*0a6a1f1dSLionel Sambuc.It Fl h
79*0a6a1f1dSLionel SambucShows a short summary of all available options and their purpose.
80*0a6a1f1dSLionel Sambuc.It Fl o Ar fmt:path
81*0a6a1f1dSLionel SambucAdds a new output format.
82*0a6a1f1dSLionel Sambuc.Ar fmt
83*0a6a1f1dSLionel Sambucis one of the formats described later on in
84*0a6a1f1dSLionel Sambuc.Sx Output formats .
85*0a6a1f1dSLionel Sambuc.Ar path
86*0a6a1f1dSLionel Sambucspecifies where the report will be written to.
87*0a6a1f1dSLionel SambucDepending on the chosen format, this may refer to a single file or to
88*0a6a1f1dSLionel Sambuca directory.
89*0a6a1f1dSLionel SambucFor those formats that write to a single file, specifying a
90*0a6a1f1dSLionel Sambuc.Sq -
91*0a6a1f1dSLionel Sambucas the path will redirect the report to the standard output.
92*0a6a1f1dSLionel Sambuc.El
93*0a6a1f1dSLionel Sambuc.Ss Output formats
94*0a6a1f1dSLionel SambucThe following output formats are allowed:
95*0a6a1f1dSLionel Sambuc.Bl -tag -width tickerXX
96*0a6a1f1dSLionel Sambuc.It csv
97*0a6a1f1dSLionel SambucA machine-parseable Comma-Separated Values (CSV) file.
98*0a6a1f1dSLionel SambucThis file contains the results for all test cases and test programs.
99*0a6a1f1dSLionel SambucTest cases are logged using the following syntax:
100*0a6a1f1dSLionel Sambuc.Bd -literal -offset indent
101*0a6a1f1dSLionel Sambuctc, duration, test-program, test-case, result[, reason]
102*0a6a1f1dSLionel Sambuc.Ed
103*0a6a1f1dSLionel Sambuc.Pp
104*0a6a1f1dSLionel SambucThe
105*0a6a1f1dSLionel Sambuc.Sq result
106*0a6a1f1dSLionel Sambucfield for test cases is always one of
107*0a6a1f1dSLionel Sambuc.Sq passed ,
108*0a6a1f1dSLionel Sambuc.Sq skipped
109*0a6a1f1dSLionel Sambucor
110*0a6a1f1dSLionel Sambuc.Sq failed .
111*0a6a1f1dSLionel SambucThe last two are always followed by a reason.
112*0a6a1f1dSLionel Sambuc.Pp
113*0a6a1f1dSLionel SambucTest programs are logged with the following syntax:
114*0a6a1f1dSLionel Sambuc.Bd -literal -offset indent
115*0a6a1f1dSLionel Sambuctp, duration, test-program, result[, reason]
116*0a6a1f1dSLionel Sambuc.Ed
117*0a6a1f1dSLionel Sambuc.Pp
118*0a6a1f1dSLionel SambucIn this case, the
119*0a6a1f1dSLionel Sambuc.Sq result
120*0a6a1f1dSLionel Sambuccan be one of:
121*0a6a1f1dSLionel Sambuc.Sq passed ,
122*0a6a1f1dSLionel Sambucwhich denotes test programs that ran without any failure;
123*0a6a1f1dSLionel Sambuc.Sq failed ,
124*0a6a1f1dSLionel Sambucwhich refers to test programs in which one or more test cases failed;
125*0a6a1f1dSLionel Sambucor
126*0a6a1f1dSLionel Sambuc.Sq bogus ,
127*0a6a1f1dSLionel Sambucwhich mentions those test programs that failed to execute by some reason.
128*0a6a1f1dSLionel SambucThe reason field is only available in the last case.
129*0a6a1f1dSLionel Sambuc.Pp
130*0a6a1f1dSLionel SambucThe time required to execute each test case and test program is
131*0a6a1f1dSLionel Sambucalso provided.
132*0a6a1f1dSLionel SambucYou should not rely on the order of the entries in the resulting output.
133*0a6a1f1dSLionel Sambuc.It ticker
134*0a6a1f1dSLionel SambucA user-friendly report that shows the progress of the test suite's
135*0a6a1f1dSLionel Sambucexecution as it operates.
136*0a6a1f1dSLionel SambucThis type of report should always be redirected to a virtual terminal,
137*0a6a1f1dSLionel Sambucnot a file, as it may use control sequences that will make the output
138*0a6a1f1dSLionel Sambucunreadable in regular files.
139*0a6a1f1dSLionel Sambuc.It xml
140*0a6a1f1dSLionel SambucA report contained in a single XML file.
141*0a6a1f1dSLionel SambucIdeal for later processing with
142*0a6a1f1dSLionel Sambuc.Xr xsltproc 1
143*0a6a1f1dSLionel Sambucto generate nice HTML reports.
144*0a6a1f1dSLionel Sambuc.El
145*0a6a1f1dSLionel Sambuc.Sh EXAMPLES
146*0a6a1f1dSLionel SambucThe most simple way of running a test suite is to pipe the output of
147*0a6a1f1dSLionel Sambuc.Nm atf-run
148*0a6a1f1dSLionel Sambucthrough
149*0a6a1f1dSLionel Sambuc.Nm
150*0a6a1f1dSLionel Sambucwithout any additional flags.
151*0a6a1f1dSLionel SambucThis will use the default output format, which is suitable to most users:
152*0a6a1f1dSLionel Sambuc.Bd -literal -offset indent
153*0a6a1f1dSLionel Sambucatf-run | atf-report
154*0a6a1f1dSLionel Sambuc.Ed
155*0a6a1f1dSLionel Sambuc.Pp
156*0a6a1f1dSLionel SambucIn some situations, it may be interesting to get a machine-parseable file
157*0a6a1f1dSLionel Sambucaside from the standard report.
158*0a6a1f1dSLionel SambucThis can be done as follows:
159*0a6a1f1dSLionel Sambuc.Bd -literal -offset indent
160*0a6a1f1dSLionel Sambucatf-run | atf-report -o csv:testsuite.csv -o ticker:-
161*0a6a1f1dSLionel Sambuc.Ed
162*0a6a1f1dSLionel Sambuc.Pp
163*0a6a1f1dSLionel SambucOr if the standard report is not desired, thus achieving completely silent
164*0a6a1f1dSLionel Sambucoperation:
165*0a6a1f1dSLionel Sambucatf-run | atf-report -o csv:testsuite.csv
166*0a6a1f1dSLionel Sambuc.Sh SEE ALSO
167*0a6a1f1dSLionel Sambuc.Xr atf-run 1 ,
168*0a6a1f1dSLionel Sambuc.Xr atf 7
169