This release is a pre-release and may not be stable for production use.
robotframework-testdoc
The new tool to generate test documentation pages for your Robot Framework project.
GitHub Project
Visit the project at GitHub - robotframework-testdoc
Documentation
Visit the official documentation for more details: Documentation - robotframework-testdoc
VS Code Extension
Generate test documentation directly from the VS Code Explorer — no terminal required.
Download the latest .vsix from GitHub Releases and install it locally.
code --install-extension testdoc-vscode-<version>.vsix
See the VS Code Extension documentation for details.
Statistics
Installation
Install the tool using the following command:
pip install robotframework-testdoc
Usage
Basic Usage
testdoc suite_directory output.html
# or
testdoc suite_file output.html
Extended Usage
testdoc [OPTIONS] suite_directory output.html
Output Formats
By default testdoc generates an HTML file. Use -f / --output-format to choose a different format:
# HTML (default)
testdoc tests/ TestDocumentation.html
# JSON — machine-readable suite tree
testdoc -f json tests/ TestDocumentation.json
# PDF — release-ready export (overview + TOC + suites + test cases)
testdoc -f pdf tests/ TestDocumentation.pdf
Available values: html (default), json, pdf.
Plugin Usage
You can use the testdoc tool also as plugin integration.
You have two option to use it this way:
- You can write your own HTML page as
jinja2template, add this HTML template as CLI argument while generating the docs and you will get your own HTML style as documentation page. - You can use the
mkdocsintegration to define your own mkdcs template as CLI argument and the testdoc tool will internally take care of the mkdocs page generation.
For further details about the usage, please read the official documentation.
Custom PDF Template
You can provide your own Jinja2 template for PDF rendering:
testdoc -f pdf --custom-pdf-template path/to/pdf_template.html tests/ TestDocumentation.pdf
This works out of the box. No code changes are required.
Required template contract:
- The template must contain a branch for
view == "overview". - The template must contain a branch for
view == "suite". - In the
overviewbranch, these variables are available:title(string),generated_at(string),suite_count(int),test_count(int). - In the
suitebranch, these variables are available:suite_name(string),tests(list of dicts). - Each item in
testshas:name(string),tags(list of strings, can be empty).
Recommended usage pattern:
- Start with the minimal template above.
- Change only markup/styling first.
- Keep variable names exactly as documented.
- If a section is empty, always handle it with
{% if tests %}/ fallback text.
Notes:
- Title page and table of contents are rendered by the PDF engine, not by the custom HTML template.
- You can also set
custom_pdf_templatein your TOML config file.
Use customized Jinja2 HTML Template
Use internal Mkdocs Template
Use customized Mkdocs Template
Examples
Visit the official documentation to find some Examples.
External Configuration File
The idea of the external configuration file is, having a central place for passing the known CMD arguments via file instead of CMD parameters.
This will keep your CMD line call simple & clean.
For using this config file, just call the following command:
# Generate docu with options defined in TOML file
testdoc -c path/to/config.toml tests/ TestDocumentation.html
pyproject.toml vs. custom toml file
Using the pyproject requires to define the testdoc sections with the prefix tool.
Example section start: [tool.testdoc]
Using your own custom toml-file, does not require you to use the prefix. Here, you can just use [testdoc] as section header.
Example Configuration File
[tool.testdoc]
title = "New title of HTML document"
name = "New name of root suite element"
doc = "New doc text of root suite element"
sourceprefix = "gitlab::https://gitlab.com/myrepo/repo_path"
include = ["TagA", "TagB"]
exclude = ["TagC"]
verbose_mode = false
[tool.testdoc.metadata]
Author = "Your-Name"
Version = "1.0.0"
Source = "AnySourceAsMetaData"
Contribution & Development
See Development.md for more information about contributing & developing this library.
Metadata
Release files for robotframework-testdoc 0.8.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework_testdoc-0.8.1a2.tar.gz | 15.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_testdoc-0.8.1a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.2 kB
Release files / robotframework_testdoc-0.8.1a2.tar.gz
| Download URL | robotframework_testdoc-0.8.1a2.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bcd550e1ae671b0e4b0a5529b10ea4b1906cdeba9f3191ddb6883387e237fe1
|
|
BLAKE2b-256 checksum How to use checksums |
8d4f746e9a883b06ad4c62ef9c7e7d8500cb88d819e86141aff02761ede65505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / robotframework_testdoc-0.8.1a2-py3-none-any.whl
| Download URL | robotframework_testdoc-0.8.1a2-py3-none-any.whl |
|---|---|
| Size | 78.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fd32178a0dfb00c0b71060f3796d6cbafbe6ecd414f24c798d0f8c1220638d2
|
|
BLAKE2b-256 checksum How to use checksums |
0276f64c1febacccf6e3c20c339604798855b4f31feead7ab2a101afca383e90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|