A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts.
Project description
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
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
[!TIP] Included Help: Visit the CLI Documentation for further arguments & details.
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.
Use customized Jinja2 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"]
hide_tags = true
hide_test_doc = true
hide_suite_doc = true
hide_source = true
hide_keywords = true
style = "blue"
verbose_mode = false
[tool.testdoc.metadata]
Author = "Your-Name"
Version = "1.0.0"
Source = "AnySourceAsMetaData"
[tool.testdoc.colors]
# Use predefined theme:
default = "blue"
# OR
# Use custom colors:
background = "#000028"
inner_color = "#000028"
button_active_color = "#193966"
button_hover_color = "#193966"
border_color = "#CCCCCC"
text_color = "#CCCCCC"
title_color = "#00ffb9"
robot_icon = "#00ffb9"
code_area_background = "#303030"
code_area_foreground = "#f1f1f1"
Theme Selection / Color Configuration
You can select between several themes (color configurations) for your HTML document to create!
[!CAUTION] This is only possible via toml-configuration file, but not via cmd args directly!
Default Themes
There are a few predefined default themes available that you can choose via the toml-configuration file OR cli.
Therefore, please use the following syntax: for the toml file
[colors]
# Use the default theme
default = "default"
default = 0
# Use the dark theme
default = "dark"
default = 1
# Use the blue theme
default = "blue"
default = 2
# Use the robot theme
default = "robot"
default = 3
# Use the dark robot theme
default = "robot_dark"
default = 4
# Use the green theme
default = "green"
default = 5
For setting it via CLI, please use the following:
# Applying dark theme
testdoc ... -S dark PATH OUTPUT_FILE
# Applying blue theme
testdoc ... --style blue PATH OUTPUT_FILE
[!TIP] You can select the default theme using either a string value or an integer value.
Custom Themes
You can apply your own custom theme to modify the colors of the created HTML document.
Use the following syntax & parameters in your toml-configuration file, to overwrite the predefined themes:
[colors]
background = "#000028"
inner_color = "#000028"
button_active_color = "#193966"
button_hover_color = "#193966"
border_color = "#CCCCCC"
text_color = "#CCCCCC"
title_color = "#00ffb9"
robot_icon = "#00ffb9"
code_area_background = "#303030"
code_area_foreground = "#f1f1f1"
[!TIP] Please make sure to configure all available color values from this example — missing values may cause layout or rendering issues in the generated HTML document!
Default Themes - Screenshot
Dark
Blue
Robot / Default
Contribution & Development
See Development.md for more information about contributing & developing this library.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_testdoc-0.5.0.tar.gz.
File metadata
- Download URL: robotframework_testdoc-0.5.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b28bcb83458b34177576ac80e8d5816eb61c39b4cca57a7cf6e633df52f73c30
|
|
| MD5 |
71436402d6184e1b16df8e0e3469e9f5
|
|
| BLAKE2b-256 |
ccd40ce20979f42347a225a0d9609e12199b7ff254b64648241fcac36f785c9c
|
File details
Details for the file robotframework_testdoc-0.5.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_testdoc-0.5.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ba723c773af80dd57bb0d8dcb44f9ba1388c1074ee8a50126add89ddce8d2b
|
|
| MD5 |
0e49834d7a62d0002e5a31d5d6b86f75
|
|
| BLAKE2b-256 |
6f3b1a23ce6595e81ddb517924346cc7783582a0c5e83b61c08941de3ac1bcaa
|