1KYUA-REPORT-HTML(1) BSD General Commands Manual KYUA-REPORT-HTML(1)
2
4 kyua report-html — Generates an HTML report with the results of a test
5 suite run
6
8 kyua report-html [--force] [--output path] [--results-file file]
9 [--results-filter types]
10
12 The kyua report-html command provides a simple mechanism to generate HTML
13 reports of the execution of a test suite. The command processes a
14 results file and then populates a directory with multiple HTML and sup‐
15 porting files to describe the results recorded in that results file.
16
17 The HTML output is static and self-contained, so it can easily be served
18 by any simple web server. The command expects the target directory to
19 not exist, because it would overwrite any contents if not careful.
20
21 The following subcommand options are recognized:
22
23 --force
24 Forces the deletion of the output directory if it exists. Use care,
25 as this effectively means a ‘rm -rf’.
26
27 --output directory
28 Specifies the target directory into which to generate the HTML files.
29 The directory must not exist unless the --force option is provided.
30 The default is ./html.
31
32 --results-file path, -s path
33 Specifies the results file to operate on. Defaults to ‘LATEST’,
34 which causes kyua report-html to automatically load the latest
35 results file from the current test suite.
36
37 The following values are accepted:
38
39 ‘LATEST’
40 Requests the load of the latest results file available for the
41 test suite rooted at the current directory.
42
43 Directory
44 Requests the load of the latest results file available for the
45 test suite rooted at the given directory.
46
47 Test suite name
48 Requests the load of the latest results file available for the
49 given test suite.
50
51 Results identifier
52 Requests the load of a specific results file.
53
54 Explicit file name (aka everything else)
55 Load the specified results file.
56
57 See Results files for more details.
58
59 --results-filter types
60 Comma-separated list of the test result types to include in the
61 report. The ordering of the values is respected so that you can
62 determine how you want the list of tests to be shown.
63
64 The valid values are: ‘broken’, ‘failed’, ‘passed’, ‘skipped’ and
65 ‘xfail’. If the parameter supplied to the option is empty, filtering
66 is suppressed and all result types are shown in the report.
67
68 The default value for this flag includes all the test results except
69 the passed tests. Showing the passed tests by default clutters the
70 report with too much information, so only abnormal conditions are
71 included.
72
73 Results files
74 Results files contain, as their name implies, the results of the execu‐
75 tion of a test suite. Each test suite executed by kyua-test(1) generates
76 a new results file, and such results files can be loaded later on by
77 inspection commands such as kyua-report(1) to analyze their contents.
78
79 Results files support identifier-based lookups and also path name
80 lookups. The differences between the two are described below.
81
82 The default naming scheme for the results files provides simple support
83 for identifier-based lookups and historical recording of test suite runs.
84 Each results file is given an identifier derived from the test suite that
85 generated it and the time the test suite was run. Kyua can later look up
86 results files by these fileds.
87
88 The identifier follows this pattern:
89
90 <test_suite>.<YYYYMMDD>-<HHMMSS>-<uuuuuu>
91
92 where ‘test_suite’ is the path to the root of the test suite that was run
93 with all slashes replaced by underscores and ‘YYYYMMDD-HHMMSS-uuuuuu’ is
94 a timestamp with microsecond resolution.
95
96 When using the default naming scheme, results files are stored in the
97 ~/.kyua/store/ subdirectory and each file holds a name of the form:
98
99 ~/.kyua/store/results.<identifier>.db
100
101 Results files are simple SQLite databases with the schema described in
102 the /usr/share/kyua/store/schema_v?.sql files. For details on the
103 schema, please refer to the heavily commented SQL file.
104
106 The kyua report-html command always returns 0.
107
108 Additional exit codes may be returned as described in kyua(1).
109
111 Workflow with results files
112 Let's say you run the following command twice in a row:
113
114 kyua test -k /usr/tests/Kyuafile
115
116 The two executions will generate two files with names like these:
117
118 ~/.kyua/store/results.usr_tests.20140731-150500-196784.db
119 ~/.kyua/store/results.usr_tests.20140731-151730-997451.db
120
121 Taking advantage of the default naming scheme, the following commands
122 would all generate a report for the results of the latest execution of
123 the test suite:
124
125 cd /usr/tests && kyua report-html
126 cd /usr/tests && kyua report-html --results-file=LATEST
127 kyua report-html --results-file=/usr/tests
128 kyua report-html --results-file=usr_tests
129 kyua report-html --results-file=usr_tests.20140731-151730-997451
130
131 But it is also possible to explicitly load data for older runs or from
132 explicitly-named files:
133
134 kyua report-html \
135 --results-file=usr_tests.20140731-150500-196784
136 kyua report-html \
137 --results-file=~/.kyua/store/results.usr_tests.20140731-150500-196784.db
138
140 kyua(1), kyua-report(1), kyua-report-junit(1)
141
142BSD October 13, 2014 BSD