Python script for converting a Robot Framework file to a reStructuredText (.rst) file
Project description
Documentation robot2rst
This script can convert your .robot files from Robot Framework to reStructuredText (.rst) files with traceable items.
Goal
This script allows you to connect your requirements to test cases via the mlx.traceability Sphinx extension. Test cases get converted to traceable items. The documentation of each test gets used to generate the body of the item. Test case names get converted to item IDs with a configurable prefix. Tags can be used to link to other traceable items.
Usage
robot2rst -i example.robot -o test_plan.rst --prefix ITEST_MY_LIB- --tags SWRQT- SYSRQT- --relationships validates ext_toolname
$ robot2rst --help
usage: robot2rst [-h] -i ROBOT_FILE -o RST_FILE [-p PREFIX]
[-r [RELATIONSHIPS [RELATIONSHIPS ...]]]
[-t [TAGS [TAGS ...]]] [--trim-suffix]
Convert robot test cases to reStructuredText with traceable items.
optional arguments:
-h, --help show this help message and exit
-i ROBOT_FILE, --robot ROBOT_FILE
Input robot file
-o RST_FILE, --rst RST_FILE
Output RST file
-p PREFIX, --prefix PREFIX
Overrides the default 'ITEST-' prefix.
-r [RELATIONSHIPS [RELATIONSHIPS ...]], --relationships [RELATIONSHIPS [RELATIONSHIPS ...]]
Name(s) of the relationship(s) used to link to items
in Tags section. The default value is 'validates'.
-t [TAGS [TAGS ...]], --tags [TAGS [TAGS ...]]
Regex(es) for matching tags to add a relationship link
for. All tags get matched by default.
--trim-suffix If the suffix of any prefix or --tags argument ends
with '_-' it gets trimmed to '-'.
Configuration
To include the script’s output in your documentation you want to add the aforementioned extension to your extensions list in your conf.py like so:
extensions = [
'mlx.traceability',
]
Please read the documentation of mlx.traceability for additional configuration steps.
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
Hashes for mlx.robot2rst-2.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b50b32879366001fa5a04cdb411467c5085a96324004462c7f368fabab417905 |
|
MD5 | 220e6116cbb1d79122c77de1044d5eab |
|
BLAKE2b-256 | 9792a97088918a59fc8d46bb900c26d4f2c8746a2a8f222f6e424fdeeb0803ae |