Table of Contents
Arguments
Invoking the command line interface with the --help option brings up the usual help message:
Panel | ||||
---|---|---|---|---|
| ||||
Usage: livingdoc [options] input [output] Run the input specification and produce a report in output file or in directory specified by -o Options: --lazy Execute document in lazy mode -l, --locale LANG Set application language (en, fr, ...) -f, --sud CLASS;ARGS Use CLASS as the system under development and instantiate it with ARGS -o DIRECTORY Produce reports in DIRECTORY (defaults to current directory) -r CLASS;ARGS Use CLASS as the document repository and instantiate it with ARGS (defaults to |
Default options
When no option is given,
defaults to the following rules:...
Any of the rules above can be overridden using command line switches.
Running with the default options
By default
executes the specification file given as an input and produces a report in the current directory. The name of the report is constructed from the name of the specification....
Running with default options | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Executing the command:
might display the following in the terminal window:
|
Specifying an output directory -o
The destination directory for report files can be specified using the -o option.
...
Specifying an output directory | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Executing the command:
might display the following in the terminal window:
and produce a report file named example.html in the reports directory. |
Executing a set of specification files (-s, --suite)
can execute all specification files found in a given directory (recursively) and produce result files in the specified output directory. The suite mode is activated using the -s option.
...
Running a suite of specifications | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
To execute all specification files found in the /home/myuser/workspace/myprojects/specs directory and produce output in the /home/myuser/workspace/myprojects/reports directory, use the following command from the /home/myuser/workspace/myprojects directory:
If the specs directory looks like this:
The reports directory would then contain the following files:
|
Changing the default Locale (--locale, -l)
It is possible to change the current locale with the --locale or -l option, followed by a valid java 2 letters locale code.
...
Changing the locale | |||||||
---|---|---|---|---|---|---|---|
Running the application in french is done like this:
|
Filtering out parts of the specification (-t)
When the specification file contains sections identified by tags, it is possible to execute only those parts of the specification that are relevant using the -t option. The -t switch has to be followed by a comma separated list of tags to consider for execution.
...
Filtering the specification | |||||||
---|---|---|---|---|---|---|---|
We can execute only the sections of the specification marked with the authentication and authorization tags like this:
|
Producing XML reports (--xml)
It is possible to produce the report file in XML format using the --xml option. The XML format produces an output file that contains both execution statistics and the annotated HTML specification.
Producing XML reports | |||||||
---|---|---|---|---|---|---|---|
We can execute only the sections of the specification marked with the authentication and authorization tags like this:
|
Using a custom specification repository (-r)
The default is for
to look for specifications on the file system. When you want to use a different specification repository, use the -r option followed by the fully qualified class name of the Repository class and a semi-colon separated list of constructor parameters for that class....
Changing the specification repository | |||||||
---|---|---|---|---|---|---|---|
To use the VFSRepository issue the command:
|
Specifying a custom system under development (--sud)
will use the DefaultSystemUnderDevelopment unless told otherwise. To specify a different system under development class, use the --sud option followed by the fully qualified class name and a semi-colon separated list of constructor parameters for that class.
Changing the system under development | |||||||
---|---|---|---|---|---|---|---|
To use the SpringSystemUnderDevelopment with the application-context.xml file located in the conf directory, use the command:
|
Changing table formalism (e.g. for Fit compliance)
It is possible to change
table formalism by specifying an InterpreterSelector class with the --selector option. By default will use its own formalism....
Enabling Fit compliance mode | |||||||
---|---|---|---|---|---|---|---|
As an example, to enable Fit compliance, use the class info.novatec.testit.livingdoc.fit.FitInterpreterSelector available in the livingdoc-extensions-fit.jar. This will cause to use Fit formalism for tables and support Fit basic interpreters:
|
Setting lazy mode (--lazy)
Enabling lazy mode changes
behavior :...
Enabling lazy mode | |||||||
---|---|---|---|---|---|---|---|
To enable lazy mode, use the command:
|
Setting debug mode (--debug)
Enabling debug mode allows you to have a full view of exceptions stack trace in your
specifications documents. Note that in the normal mode the stack trace are limited.Enabling debug mode | |||||||
---|---|---|---|---|---|---|---|
To enable debug mode, use the command:
|
Stop on first failure (--stop)
Stop on first failure | |||||||
---|---|---|---|---|---|---|---|
To stop the execution of a specification when a failure is detected, use the command:
|