testdoc.py

testdoc.py is a tool for generating a high level documentation from Robot Framework test data. It is included in source distributions and can also be downloaded from http://code.google.com/p/robotframework/wiki/TestDataDocumentationTool.

Synopsis

testdoc.py [options] test_data

Options

Most of the options accepted by this tool have exactly same semantics as same options have when executing test cases.

-o, --output <path>
 Where to write the generated documentation. If the path is a directory, the documentation is generated there using name <suitename>-doc.html.
-T, --title <title>
 Set the title of the generated documentation. Underscores in the title are converted to spaces.
-N, --name <name>
 Set the name of the top level test suite.
-D, --doc <document>
 Set the document of the top level test suite.
-M, --metadata <name:value>
 Set metadata of the top level test suite. See
-G, --settag <tag>
 Set given tag(s) to all test cases.
-t, --test <name>
 Include test cases by name.
-s, --suite <name>
 Include test suites by name.
-i, --include <tag>
 Include test cases by tags.
-e, --exclude <tag>
 Exclude test cases by tags.
-h, --help Print this help in the console.

Description

This tool generates a high level test documentation from a given Robot Framework test data. The generated documentation includes the names, documentations and other metadata of all test suites and test cases, as well as the names and arguments of the top-level keywords. The tool also writes down the total number of test cases per suite. The documentation format is based on the normal test execution logs.

It is possible to select suites and tests to be included in the documentation similarly as when choosing the test cases to be executed with Robot Framework. The test data is parsed similarly as when executing the tests, but the variables are not resolved.

Note

This tool requires Robot Framework 2.0.3 or newer to be installed.

Examples:

$ testdoc.py mytestcases.html
$ testdoc.py --name smoke_test_plan --include smoke path/to/my_tests/

Screenshot

The figure below shows the test documentation created from Robot Framework Quick Start Guide.

testdoc.png