1 .\" Copyright 2011 Google Inc.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions are
8 .\" * Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" * Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" * Neither the name of Google Inc. nor the names of its contributors
14 .\" may be used to endorse or promote products derived from this software
15 .\" without specific prior written permission.
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .Nd Command-line interface to Kyua quality assurance toolkit
36 .Op Fl -config Ar file
37 .Op Fl -logfile Ar file
38 .Op Fl -loglevel Ar level
39 .Op Fl -variable Ar name=value
41 .Op Ar command_options
42 .Op Ar command_arguments
44 Kyua is a quality assurance toolkit: a package that provides libraries to
45 aid in the creation of test cases, and tools to execute such test cases and
46 generate reports of their results.
48 This manual page describes
50 (note the lowercase), which is the command-line interface to the Kyua
53 If you are here because all you want to know is how to run the tests in
55 you most likely want to read the
57 manual page instead if your system provides one.
59 As can be observed in the synopsis, the interface of
61 implements a common subcommand-based interface. The arguments to the tool
62 specify, in this order: a set of common options that all the commands
65 name that specifies what
68 a set of possibly-optional
72 that are specific to the chosen command.
73 .Ss Options supported by all commands
74 The following options are recognized by all the commands.
75 Keep in mind that these must always be specified before the command name.
77 .It Fl -config Ar path , Fl c Ar path
78 Specifies the configuration file to process, which must be in the format
83 explicitly disables the loading of any configuration file.
87 if it exists, otherwise to
88 .Pa __CONFDIR__/kyua.conf
92 .It Fl -logfile Ar path
93 Specifies the location of the file to which
95 will log run time events useful for postmortem debugging.
97 The default depends on different environment variables as described in
99 but typically the file will be stored within the user's home directory.
100 .It Fl -loglevel Ar level
101 Specifies the maximum logging level to record in the log file.
108 .It Fl -variable Ar name=value , Fl v Ar name=value
111 configuration variable to
113 The values set through this option have preference over the values set in the
116 The specified variable can either be a builtin variable or a test-suite
117 specific variable. See
121 .Ss Available commands
122 The following commands are generic and do not have any relation to the execution
123 of tests or the inspection of their results:
124 .Bl -tag -width reportXhtmlXX -offset indent
126 Shows general program information.
130 Inspects the values of the configuration variables.
134 Executes an arbitrary SQL statement in the store database and prints the
139 Shows usage information.
144 The following commands are used to generate reports based on the data previously
145 stored in the database:
146 .Bl -tag -width reportXhtmlXX -offset indent
148 Generates a plain-text report.
152 Generates an HTML report.
154 .Xr kyua-report-html 1 .
157 The following commands are used to interact with a test suite:
158 .Bl -tag -width reportXhtmlXX -offset indent
160 Executes a single test case in a controlled environment for debugging purposes.
164 Lists test cases and their metadata.
174 has a logging facility that collects all kinds of events at run time.
175 These events are always logged to a file so that the log is available when
176 it is most needed: right after a non-reproducible problem happens.
177 The only way to disable logging is by sending the log to
180 The location of the log file can be manually specified with the
182 option, which applies to all commands. If no file is explicitly specified, the
183 location of the log files is chosen in this order:
184 .Bl -enum -offset indent
186 .Pa ${HOME}/.kyua/logs/
199 And the default naming scheme of the log files is:
200 .Sq <progname>.<timestamp>.log .
202 The messages stored in the log file have a level (or severity) attached to
204 .Bl -tag -width warningXX -offset indent
206 Fatal error messages. The program generally terminates after these, either
207 in a clean manner or by crashing.
209 Non-fatal error messages. These generally report a condition that must be
210 addressed but the application can continue to run.
212 Informational messages. These tell the user what the program was doing at
213 a general level of operation.
215 Detailed informational messages. These are often useful when debugging
216 problems in the application, as they contain lots of internal details.
219 The default log level is
221 unless expicitly overriden with
224 The log file is a plain text file containing one line per log record. The
225 format of each line is as follows:
226 .Bd -literal -offset indent
227 timestamp entry_type pid file:line: message
237 for an informational message and
241 If you think you have encountered a bug in
243 please take the time to let the developers know about it. This will ensure
244 that the bug is addressed and potentially fixed in the next Kyua release.
246 The first step in reporting a bug is to check if there already is a similar
247 bug in the database. You can check what issues are currently in the
248 database by going to:
249 .Bd -literal -offset indent
250 http://code.google.com/p/kyua/issues/list
253 If there is no existing issue that describes an issue similar to the
254 one you are experiencing, you can open a new one by visiting:
255 .Bd -literal -offset indent
256 http://code.google.com/p/kyua/issues/entry
259 When doing so, please include as much detail as possible. Among other
260 things, explain what operating system and platform you are running
262 on, what were you trying to do, what exact messages you saw on the screen,
263 how did you expect the program to behave, and any other details that you
266 Also, please include a copy of the log file corresponding to the problem
267 you are experiencing. Unless you have changed the location of the log
268 files, you can most likely find them in
270 If the problem is reproducible, it is good idea to regenerate the log file
271 with an increased log level so as to provide more information. For
273 .Bd -literal -offset indent
274 $ kyua --logfile=problem.log --loglevel=debug \\
275 [rest of the command line]
278 The following variables are recognized and can be freely tuned by the end user:
279 .Bl -tag -width COLUMNSXX
281 The width of the screen, in number of characters.
283 uses this to wrap long lines.
284 If not present, the width of the screen is determined from the terminal
285 stdout is connected to, and, if the guessing fails, this defaults to infinity.
287 Path to the user's home directory.
289 uses this location to determine paths to configuration files and default log
292 Path to the system-wide temporary directory.
294 uses this location to place the work directory of test cases, among other
297 The default value of this variable depends on the operating system. In
302 The following variables are also recognized, but you should not need to set them
303 during normal operation.
304 They are only provided to override the value of built-in values, which is useful
308 .Bl -tag -width KYUAXCONFDIRXX
310 Path to the system-wide configuration files for
316 Path to the location of installed documentation.
321 Path to the location of the installed miscellaneous scripts and data
328 Path to the location of the installed store support files; e.g. the
329 directory containing the SQL database schema.
333 .It Va KYUA_TESTERSDIR
334 Path to the location of the installed testers; e.g. the directory containing
342 .It Pa ~/.kyua/kyua.conf
343 User-specific configuration file.
345 Default location for the collected log files.
346 .It Pa __CONFDIR__/kyua.conf
347 System-wide configuration file.
351 returns 0 on success, 1 on a controlled error condition in the given
352 subcommand, 2 on a general unexpected error and 3 on a usage error.
354 The documentation of the subcommands in the corresponding manual pages only
355 details the difference between a successful exit (0) and the detection of a
356 controlled error (1). Even though when those manual pages do not describe
357 any other exit statuses, codes above 1 can be returned.
362 For more details on the people that made
364 possible and the license terms, run:
365 .Bd -literal -offset indent