SW-Tests
SW-Tests
Test case naming
This file contains the software test cases of trlcdoc. There is one test case per pytest test function in
the tests folder: the test function test_<name> implements the test case tc_<name>. The test result
report relates the pytest results to the test cases by this naming rule.
Most test cases run trlcdoc on a minimal example project, created by the test fixtures in a temporary folder.
Command Line Interface
tc_cli
Attribute Name |
Attribute Value |
|---|---|
Description |
Run |
Verifies |
tc_cli_help
Attribute Name |
Attribute Value |
|---|---|
Description |
Call trlcdoc with |
Verifies |
tc_cli_version
Attribute Name |
Attribute Value |
|---|---|
Description |
Call trlcdoc with |
Verifies |
tc_verbose_output
Attribute Name |
Attribute Value |
|---|---|
Description |
Verbose output ( Run the tests step without
|
Verifies |
tc_verbose_secrets
Attribute Name |
Attribute Value |
|---|---|
Description |
No secrets in the verbose output ( Run with |
Verifies |
tc_verbose_tools
Attribute Name |
Attribute Value |
|---|---|
Description |
Verbose tool output ( Run commands with |
Verifies |
tc_interrupted
Attribute Name |
Attribute Value |
|---|---|
Description |
Interrupt ( Interrupt a step with Ctrl+C. Check the exit code 130 and the message. |
Verifies |
tc_steps
Attribute Name |
Attribute Value |
|---|---|
Description |
Step selection ( Call trlcdoc
Check the executed steps and the error exit code for the unknown step. |
Verifies |
tc_step_order
Attribute Name |
Attribute Value |
|---|---|
Description |
Request steps in reverse order and request the convert step alone. Check that the steps run in the fixed
order and that the plantuml step is added ( |
Verifies |
tc_exit_code
Attribute Name |
Attribute Value |
|---|---|
Description |
Exit codes ( Run
Check the exit codes 0, 1 and 2, and that a missing program is named in the error without traceback. |
Verifies |
tc_external_tools
Attribute Name |
Attribute Value |
|---|---|
Description |
External tools ( Run without Java and Graphviz on the
Check the exit codes and the missing tool named in the error message. |
Verifies |
Configuration
tc_config_file
Attribute Name |
Attribute Value |
|---|---|
Description |
Configuration file discovery (
Check the used configuration and the error. |
Verifies |
tc_config_validation
Attribute Name |
Attribute Value |
|---|---|
Description |
Configuration validation ( Load configurations violating the schema, including a pyTRLCConverter option outside the pyTRLCConverter options of a document, and configurations with
Check that every error is reported with its location, and that no step runs. Load a configuration file with known line numbers and reference errors, schema errors, a missing key, a key that is not allowed and a repeated document id. Check that each error starts with the file and line of its entry, the missing key with the line of its parent, the repeated id with the line of its second occurrence. Load a file that is no valid YAML and check that the syntax error is reported with its position and exit code 2. Load test link configurations with property, output pattern, name pattern, output and name pattern,
no link method, an output pattern without Load implementation levels with lobster-python and lobster-doxygen, each with |
Verifies |
tc_toctree_check
Attribute Name |
Attribute Value |
|---|---|
Description |
Table of contents check ( Run the check step with project start pages listing
Check the findings with the right page names and their reason, and the exit code 1. Check that the
same start page is right for the tracing report in HTML format, that a start page with placeholders,
page names and a Markdown document with its own toctree has no findings, and that misspelled
|
Verifies |
tc_toctree_entries
Attribute Name |
Attribute Value |
|---|---|
Description |
Read the toctree entries of a reStructuredText page with LF and CRLF line ends and of a Markdown page
with MyST toctrees. Check that titles, a leading |
Verifies |
tc_project_settings
Attribute Name |
Attribute Value |
|---|---|
Description |
Configure the project name, version, author, copyright, logo and repository. Check the settings passed
to the HTML site, the default repository |
Verifies |
tc_output_folder
Attribute Name |
Attribute Value |
|---|---|
Description |
Output folder location ( Check
|
Verifies |
tc_output_option
Attribute Name |
Attribute Value |
|---|---|
Description |
Output folder option ( Run steps with
|
Verifies |
Output Folder
tc_output_marker
Attribute Name |
Attribute Value |
|---|---|
Description |
Use a missing and prepare an empty output folder. Check that both are marked as trlcdoc output folder
( |
Verifies |
tc_clean
Attribute Name |
Attribute Value |
|---|---|
Description |
Clean step ( Run the clean step after creating build artifacts and once more without output folder. Check
|
Verifies |
tc_delete_protection
Attribute Name |
Attribute Value |
|---|---|
Description |
Delete protection (
Check the errors, the exit code 2 and that the folder content is unchanged. |
Verifies |
Documents
tc_plantuml
Attribute Name |
Attribute Value |
|---|---|
Description |
PlantUML provision ( Provide PlantUML by
Check the selected jar or server, the exported environment variable and the error. |
Verifies |
tc_plantuml_headless
Attribute Name |
Attribute Value |
|---|---|
Description |
Headless PlantUML ( Check that the PlantUML jar runs headless:
|
Verifies |
tc_plantuml_picoweb
Attribute Name |
Attribute Value |
|---|---|
Description |
Local PlantUML server ( Provide PlantUML with a jar and check that
|
Verifies |
tc_plantuml_picoweb_stop
Attribute Name |
Attribute Value |
|---|---|
Description |
Stopping the local PlantUML server ( Run trlcdoc with a PlantUML jar and check that the picoweb server process has ended
|
Verifies |
tc_plantuml_picoweb_fallback
Attribute Name |
Attribute Value |
|---|---|
Description |
Fallback to the PlantUML jar ( Provide PlantUML with
Check the warning, the exported jar and that no server process is left. |
Verifies |
tc_trlc_conversion
Attribute Name |
Attribute Value |
|---|---|
Description |
TRLC conversion ( Convert the architecture of the example project, which includes the requirements, with a project converter, translation and render configuration into reStructuredText and Markdown. Check that the architecture records are converted and the included requirements are not. |
Verifies |
tc_builtin_converters
Attribute Name |
Attribute Value |
|---|---|
Description |
Built-in converters ( Convert the requirements, architecture, test cases and test results of the example project with the built-in converters into both formats. Check the converted content, the anchors of the test results in reStructuredText and the error for missing test results. |
Verifies |
tc_conversion_error
Attribute Name |
Attribute Value |
|---|---|
Description |
Conversion errors ( Convert an architecture with an unresolved requirement reference, and a document without Markdown converter. Check the build error and that only the configured format is converted. |
Verifies |
Tests
tc_test_run
Attribute Name |
Attribute Value |
|---|---|
Description |
Test run ( Run the tests of the example project
Check the result file, the coverage report, the test result and the errors. |
Verifies |
tc_test_results
Attribute Name |
Attribute Value |
|---|---|
Description |
Test result records ( Read a JUnit XML file with
Check
|
Verifies |
tc_test_results_output
Attribute Name |
Attribute Value |
|---|---|
Description |
Test results linked by output ( Read a Ceedling JUnit XML file with Unity suite output: a test tracing a test case twice and to a second test case, a failed test, a skipped test, a second suite, an unrelated message and a trace line without Unity prefix. Read a pytest JUnit XML file with test case output, with a test having a property and output, and with tests without output. Check
|
Verifies |
tc_test_results_package
Attribute Name |
Attribute Value |
|---|---|
Description |
Package of the test result records ( Write test result records linked to test cases
Check the package of the written records and the errors. |
Verifies |
Tracing
tc_trace_levels
Attribute Name |
Attribute Value |
|---|---|
Description |
Create the tracing report of the example project. Check the generated LOBSTER policy and extraction
configuration, and the traced items with their links ( |
Verifies |
tc_trace_report
Attribute Name |
Attribute Value |
|---|---|
Description |
Online tracing report ( Create the tracing report
Check the links to the repository files at the current commit, with the subfolder for a project in a subfolder. Check that the test results link to their row on the site page, named by their record, not to their generated records. |
Verifies |
tc_trace_markdown
Attribute Name |
Attribute Value |
|---|---|
Description |
Markdown descriptions in the tracing report ( Create the tracing report of a requirement with a wrapped Markdown description
Check that the description is plain text with line breaks by default, and rendered Markdown in one
paragraph with |
Verifies |
tc_trace_report_rst
Attribute Name |
Attribute Value |
|---|---|
Description |
Tracing report as site pages ( Build a site with a page header and
|
Verifies |
tc_page_placeholders
Attribute Name |
Attribute Value |
|---|---|
Description |
Replace |
Verifies |
tc_documents_placeholder_unlisted
Attribute Name |
Attribute Value |
|---|---|
Description |
{documents} without explicitly listed documents ( Replace |
Verifies |
tc_page_placeholders_site
Attribute Name |
Attribute Value |
|---|---|
Description |
Page placeholders in a site ( Build a site whose start page contains only |
Verifies |
tc_trace_findings
Attribute Name |
Attribute Value |
|---|---|
Description |
Create the tracing report of a project with an untraced requirement. Check the listed item, its tracing
status and the exit code 1 ( |
Verifies |
tc_trace_justified
Attribute Name |
Attribute Value |
|---|---|
Description |
Create the tracing report of a project with an implementation level that has a function marked with
|
Verifies |
tc_trace_doxygen
Attribute Name |
Attribute Value |
|---|---|
Description |
C/C++ code tracing ( Create the tracing report of a project with a C function, an |
Verifies |
HTML Site
Shared HTML site
The HTML site test cases share one site, built with trlcdoc all from the example project in a git
repository. It contains a PlantUML diagram and a document of every type. They need a Java runtime for
PlantUML.
tc_html_site
Attribute Name |
Attribute Value |
|---|---|
Description |
Check the exit code 0 of the build, the start page with the table of contents, and that every listed
page exists ( |
Verifies |
tc_documents
Attribute Name |
Attribute Value |
|---|---|
Description |
Check that the pages appear in the configured order with their configured titles
( |
Verifies |
tc_document_types
Attribute Name |
Attribute Value |
|---|---|
Description |
Document types ( Check the content of the document pages of type
Check the rendered diagram. |
Verifies |
tc_html_customization
Attribute Name |
Attribute Value |
|---|---|
Description |
HTML site customization ( Build a separate site with
Check
|
Verifies |
tc_html_version_info
Attribute Name |
Attribute Value |
|---|---|
Description |
Check that every page shows the git describe output and the branch the site was built from
( |
Verifies |
tc_html_version_info_git_state
Attribute Name |
Attribute Value |
|---|---|
Description |
Version control state ( Check the version control state of the page footer
|
Verifies |
tc_show
Attribute Name |
Attribute Value |
|---|---|
Description |
Show step ( Run the show step
Check the opened page, that |
Verifies |
tc_markdown_links
Attribute Name |
Attribute Value |
|---|---|
Description |
Relative links of Markdown pages ( Build the site of a project in a subfolder of a git repository with a Markdown page in a sub folder. Check
|
Verifies |
tc_markdown_links_as_text
Attribute Name |
Attribute Value |
|---|---|
Description |
Build a site without git repository with a Markdown page linking to a project file. Check that the
link is shown as text and a warning is reported ( |
Verifies |