SW-Requirements
trlcdoc
This file contains the software requirements for trlcdoc, the configurable documentation tooling for TRLC based projects.
Tool Operation Overview
Software Requirements
General
sw_req_cli
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall provide its functionality as a command-line interface (CLI) tool named |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Every feature shall be accessible via the command line. Therefore it is verified by CLI tests. |
sw_req_cli_help
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall show usage help information when called with the command line argument |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc with |
sw_req_cli_version
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall show its version and exit successfully when called with the command line
argument |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc with |
sw_req_steps
Attribute Name |
Attribute Value |
|---|---|
Description |
Build steps The software shall organize the documentation build using the steps:
The user shall be able to select the steps to execute. Without a selection, all steps except clean and show shall be executed. Steps without the needed configuration sections shall be skipped.. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc without step, with single steps and with combinations of steps. Check that exactly the selected steps are executed. |
sw_req_step_order
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall execute the selected steps in a fixed order, independent of the order given on the command line, and internally add steps a selected step depends on. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc with steps in reverse order and with a step that needs PlantUML. Check the execution order and that PlantUML is provided. |
sw_req_exit_code
Attribute Name |
Attribute Value |
|---|---|
Description |
Exit codes The software shall terminate with exit code:
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run trlcdoc on a project without findings, with a failing test, with an invalid configuration, with a missing program in a configured command and with an interrupt. Check the exit codes. |
sw_req_verbose_output
Attribute Name |
Attribute Value |
|---|---|
Description |
Verbose output On request, the software shall show additional output to aid debugging. With
With trlcdoc’s own verbose lines shall start with their level name. The output of tools, also of Sphinx,
shall be passed through unchanged. Without |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run a step without |
sw_req_external_tools
Attribute Name |
Attribute Value |
|---|---|
Description |
External tools Before a step uses an external tool that is not installed with the software, the software shall check that the tool is available. If it is missing, the software shall stop with a build error that names the tool and what needs it. The checked tools are:
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the plantuml, trace and html steps without Java and Graphviz, and the plantuml step with a PlantUML server. Check the exit codes and the error messages. |
Configuration
sw_req_config_file
Attribute Name |
Attribute Value |
|---|---|
Description |
Configuration file The software shall read all project specific settings from a YAML configuration file. Without a file
given on the command line, it shall use the file |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc from the project root, from a subfolder and with an explicit configuration file. Check that the expected configuration is used. |
sw_req_config_validation
Attribute Name |
Attribute Value |
|---|---|
Description |
Configuration validation Before a step is executed, the software shall
An invalid configuration shall be reported with the location of each error in the configuration and the line of the entry in the configuration file. An error about a missing entry shall be reported with the line of its parent entry. A configuration file that is no valid YAML shall be reported with the position of the syntax error. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Call trlcdoc with configurations violating the schema and with unresolved references. Check the error messages and that no step is executed. |
sw_req_toctree_check
Attribute Name |
Attribute Value |
|---|---|
Description |
Table of contents check With a project start page, the check step shall compare the table of contents entries of the start page and of the reStructuredText and Markdown documents with the page names of the documents. It shall report as finding
Entries in folders that belong to no document shall be accepted, e.g. pages of Sphinx extensions. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Check start pages with wrong entries, a missing document and a page of a Sphinx extension, with both tracing report formats, a correct start page and a Markdown toctree. Check the findings and the exit code. Read the entries of reStructuredText and Markdown toctrees. |
sw_req_project_settings
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall take project metadata (name, optional version, author, copyright, repository, logo) from the configuration. A configured version shall follow the project name in the HTML title. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build the documentation with different project metadata and check the generated site. |
Documents
sw_req_documents
Attribute Name |
Attribute Value |
|---|---|
Description |
Document list The software shall build the documentation from a configurable, ordered list of documents. Each document has a unique id and a title. A TRLC document may take its title from its converted content. A reStructuredText or Markdown document takes its title from its first heading, unless a title is configured. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Configure documents in different orders and check the table of contents of the generated site. Check the title of Markdown documents with and without configured title. |
sw_req_document_types
Attribute Name |
Attribute Value |
|---|---|
Description |
Document types The software shall support these document types:
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build a documentation containing every document type and check the generated pages. |
sw_req_trlc_conversion
Attribute Name |
Attribute Value |
|---|---|
Description |
TRLC conversion The software shall convert TRLC documents with pyTRLCConverter into reStructuredText or Markdown, using the converter, translation and render configuration of the pyTRLCConverter options of each document. Records of included documents shall be available for resolving references, without being part of the output. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Convert a document referencing records of an included document into both formats. Check the output and that the included records are not part of it. |
sw_req_builtin_converters
Attribute Name |
Attribute Value |
|---|---|
Description |
Built-in converters The software shall provide built-in converters for
which projects can reference instead of requiring their own converter files. The reStructuredText converter for test results shall give every result an anchor, so links can lead to it. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Convert documents of each kind using the built-in converters and check the output, also the anchors of the test results. |
sw_req_plantuml
Attribute Name |
Attribute Value |
|---|---|
Description |
PlantUML renderer The software shall provide a PlantUML renderer for the diagrams of the documents. It shall use
A PlantUML jar shall run headless, without the graphical user interface support of the system. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the plantuml step
Check the used jar or server. Check that the convert and html steps run the PlantUML jar headless on every system. |
sw_req_plantuml_picoweb
Attribute Name |
Attribute Value |
|---|---|
Description |
Local PlantUML server Starting Java takes seconds, rendering a diagram milliseconds. If PlantUML is a jar and the configuration doesn’t disable it, the software shall start the jar once as local PlantUML server (picoweb) and render all diagrams of the run with it.
If the server doesn’t render a diagram within a time limit, the software shall stop it, print a warning and render each diagram with the jar. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the plantuml step with a jar, with the server disabled and with a server URL in the |
Tests
sw_req_test_run
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall run the project tests with pytest or a configured command and read their results from a JUnit XML file. If configured, it shall create a code coverage report. Results and coverage reports of a previous run shall not be reported as the results of a test command that does not create them. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the tests step with pytest, with coverage and with a custom command. Check the result file and the coverage report. Run a custom command that writes neither of them after a successful run, and check the error. |
sw_req_test_results
Attribute Name |
Attribute Value |
|---|---|
Description |
Test result records The software shall convert the test results into TRLC test result records, which reference their TRLC test cases.
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the tests step with tests
and with test cases of another package, of several packages and without package. Check the generated records and the errors. |
Tracing
sw_req_trace_levels
Attribute Name |
Attribute Value |
|---|---|
Description |
Trace levels The software shall derive the LOBSTER tracing configuration from configured trace levels. Each level names
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Configure trace levels for requirements, architecture, tests and test results and check the generated tracing report. |
sw_req_trace_report
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall create an HTML tracing report. On request, the report shall link the items to their sources in the project repository, also for a project in a subfolder of the repository. On request, the report shall render the item descriptions as Markdown. Test results are generated into the output folder, which neither the repository nor the site contains. Their items shall link to their result on the site page of their test results document instead. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Create the tracing report offline and online, online also for a project in a subfolder of the repository and with an output folder outside the repository. Check the item links of the reports, also of the test results. Create the report with and without Markdown rendering and check the descriptions. |
sw_req_trace_report_rst
Attribute Name |
Attribute Value |
|---|---|
Description |
Tracing report as site pages On request, the software shall include the tracing report as pages of the HTML site, one page per trace level, instead of embedding the HTML tracing report. The links to the item sources shall work from the site pages. Test result items shall link to their result on the site page of their test results document. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build a site with the tracing report as site pages. Check the start page with its title, the level pages with their items, the page header, the links to the item sources and to the test results. |
sw_req_trace_findings
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall list the items with missing trace links and report them as findings.
Items justified in LOBSTER (e.g. by |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the trace step on a project with an untraced requirement. Check the listed item and the exit code. Run it on a project with a justified function. Check that it is counted as justified and the exit code is 0. |
sw_req_trace_doxygen
Attribute Name |
Attribute Value |
|---|---|
Description |
C/C++ code tracing The software shall extract the trace links of C/C++ code from the doxygen |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Trace a C function through a Doxyfile outside and above its source folder, check the traced item and its source file. Run the trace step without doxygen with and without such a level and check the error. |
HTML Site
sw_req_html_site
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall build a static HTML site with Sphinx, containing a start page with the table of contents and one page per configured document. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build the site and check the start page, the table of contents and every document page. |
sw_req_html_version_info
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall show the version control state the documentation was built from on every page:
the output of |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build the site in a git working copy and check the version control state on the pages. Check it outside of git, with a tag, after a commit, with uncommitted changes and with a detached HEAD. |
sw_req_html_customization
Attribute Name |
Attribute Value |
|---|---|
Description |
HTML site customization The software shall allow the project to customize the HTML site with
Project pages shall be able to refer to files of the project independent of their location in the site. A project page shall be able to disable this, to show the placeholder text itself. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build a site with
Check the pages and the applied configuration. |
sw_req_markdown_links
Attribute Name |
Attribute Value |
|---|---|
Description |
Relative links of Markdown pages The software shall resolve the relative links and images of a Markdown page against the location of its Markdown file in the project:
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build a site with a Markdown page linking to a site page, a TRLC document folder, a project file and a project folder, and showing a project image. Check the links and the image, with and without a repository, for a project in the repository root and in a subfolder. |
sw_req_page_placeholders
Attribute Name |
Attribute Value |
|---|---|
Description |
Page placeholders The software shall replace these placeholders in the project start page, the page header and the reStructuredText and Markdown documents:
A placeholder naming no document shall be reported as configuration error. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Replace the placeholders for pages at different depths and both tracing report formats. Build sites
with both tracing report formats whose start page and pages use the placeholders, and check the
table of contents and the links. Check that |
Output
sw_req_output_folder
Attribute Name |
Attribute Value |
|---|---|
Description |
Output folder The software shall write all generated files into a configurable output folder. The output folder shall not be
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Build the documentation and check that no file outside the output folder was created or changed. Configure forbidden output folders and check the errors. |
sw_req_output_option
Attribute Name |
Attribute Value |
|---|---|
Description |
Output folder option The software shall accept an output folder on the command line, which replaces the configured output folder for this run. A relative folder shall be relative to the current folder. The same location rules as for the configured output folder shall apply. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run steps with a relative and an absolute output folder on the command line. Check the used folder, that the configured folder is not used, and the errors for forbidden folders. |
sw_req_clean
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall remove all build artifacts with the clean step. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the clean step after a build and check that the output folder is removed. |
sw_req_show
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall open the start page of the built HTML site in the web browser with the show step, under Linux, Windows and the Windows Subsystem for Linux. If the site is not built or no web browser is available, the software shall report the problem as build error. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Run the show step with a built site, without a site and without web browser. Check the opened page, the error messages and the exit code. |
sw_req_delete_protection
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall delete only folders it created itself. It shall refuse to delete an existing folder with other content and report an error. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
Verification Criteria |
Configure an existing source folder as output folder and run the clean and build steps. Check the error and that the folder content is unchanged. |
Software Constraints
sw_constraint_python
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall be implemented in Python and run with Python 3.10 or higher. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
sw_constraint_os_win
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall support the Windows operating system. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
sw_constraint_os_linux
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall support the Linux operating system. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
sw_constraint_os_macos
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall support the macOS operating system. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
sw_constraint_project_independent
Attribute Name |
Attribute Value |
|---|---|
Description |
The software shall contain no project specific content, so a single copy can be shared between projects, e.g. as git submodule. |
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |
sw_constraint_toolchain
Attribute Name |
Attribute Value |
|---|---|
Description |
Toolchain The software shall use
|
Valid Status |
VALID_STATUS.valid |
Note |
N/A |
Derived |
N/A |