Tool for generating test documentation
Project description
k3testdocumentation-generator
Tool for generating test documentation out of a test hierarchy or test.son
##Installation (use within viruatlenv or equivalent)
pip install k3testdocumentation-generator
###Prerequisites/Limitations:
wkhtmltopdf needs to be installed when generating PDFs (required by the pdfkit library). It is available in the package managers of the common linux distributions.
May require running a virtual X server on a headless environment.
##Usage:
###k3testdocumentation-generator
usage: k3testdocumentation-generator [-h] [-te {jinja2}] [-to {html,latex}]
[-ot {pdf,json,raw}] [-o OUTPUT]
[--template TEMPLATE] [-v] [-vv]
input
CLI tool for creating a test document from a test directory or JSON
Author: Joachim Kestner <joachim.kestner@khoch3.de>
Version: 0.2.0
positional arguments:
input Input to generate documentation from. Can either be a
directory containing the specified structure or an
appropriate JSON
optional arguments:
-h, --help show this help message and exit
-te {jinja2}, --template_engine {jinja2}
The templating engine. Currently only jinja2 is
supported.
-to {html,latex}, --template_output {html,latex}
The content language within the template. Only html is
supported.
-ot {pdf,json,raw}, --output_type {pdf,json,raw}
The output format. JSON would output the data before
it goes into the templating engine. Raw is the raw
result after the templating engine has run. Default is
'pdf'
-o OUTPUT, --output OUTPUT
Output file path. If not set a name will be generated
by: basename(input) + '.' + output_type.lower()
--template TEMPLATE The path to an alternative template
-v, --verbose Enable info logging
-vv, --extra_verbose Enable debug logging
###k3testdocumentation-generate-coverage
usage: k3testdocumentation-generate-coverage [-h] [-te {jinja2}]
[-to {html,latex}]
[-ot {pdf,json,raw}] [-o OUTPUT]
[--template TEMPLATE] [-v] [-vv]
requirements input
CLI tool for creating a coverage from a standardised test documentation repository
Author: Joachim Kestner <joachim.kestner@khoch3.de>
Version: 0.2.0
positional arguments:
requirements The requirements as a list of strings in JSON format
input Input to generate coverage from. Can either be a
directory containing the specified structure or an
appropriate JSON
optional arguments:
-h, --help show this help message and exit
-te {jinja2}, --template_engine {jinja2}
The templating engine. Currently only jinja2 is
supported.
-to {html,latex}, --template_content_format {html,latex}
The content language within the template. Only html is
supported. This is used when generating a pdf.
-ot {pdf,json,raw}, --output_type {pdf,json,raw}
The output format. JSON would output the data before
it goes into the templating engine. Raw is the raw
result after the templating engine has run. Default is
'pdf'
-o OUTPUT, --output OUTPUT
Output file path. If not set it will be
coverage_matrix.<type>
--template TEMPLATE The path to an alternative template
-v, --verbose Enable info logging
-vv, --extra_verbose Enable debug logging
##Example:
Create a the test directory structure (example included in src).
This structure works with the inbuilt template. To support a different
structure create a custom template and pass it using the --template parameter.
Note: any json file will be opened and interpreted. In the default structure
all json files need contain a list of strings
example_test_dir/
├── TC.XX.01
│ ├── precondition.md
│ ├── required_equiptment.json
│ ├── requirements_fully_tested.json
│ ├── requirements_partially_tested.json
│ ├── test_descrition.md
│ └── test_name.txt
└── TC.XX.02
├── test_descrition.md
└── __test__.json (Abbreviated form allowing the direct instanciation of
keys in one file. Will be overwritten if the file also
exists)
Corresponding k3testdocumentation-generator command:
k3testdocumentation-generator example_test_dir/ -v -o output.pdf
Corresponding k3testdocumentation-generate-coverage command:
and a required json file exists with requirements in the folling format
["R1","R2","P1","P2"]
k3testdocumentation-generate-coverage requirements_list.json example_test_dir/ -v -o output.pdf
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 k3testdocumentation-generator-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9098c8970b77081a786022e988995f65d25ba30b0fba4d26d6c17bd0db1a257 |
|
MD5 | f47b1edc5cb92e621bd22ea58096c21d |
|
BLAKE2b-256 | 4d1c03f0466818cd186eb46da5d047b3d80dc2333d373f9c06302d8ae3c131b4 |
Hashes for k3testdocumentation_generator-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9019cd3f04fb2a2bd5084758e2160b7593d83ac87cd075d7a874cf6e6bc9c9 |
|
MD5 | a7511caec4b7094071b78fc7f2e82a3a |
|
BLAKE2b-256 | 2735e5a397dca275974454347311ab143f70ba14f08b36f520379df7e58dfa1f |