-
Notifications
You must be signed in to change notification settings - Fork 8
5 REQ trace
Tracing requirements down to code level provides better overview of the project status, and helps with impact analysis. It is also mandatory to achieve certain certifications.
Only traces at code level are considered, because traces between requirements are already covered by most project management tools.
The requirement ID must be used for tracing, because the ID uniquely identifies a requirement.
To know where a trace is located, the file path and line number must be stored. This information helps developers with project navigation and is needed for coverage analysis.
Some requirements cannot be traced, because there is no related artifact a trace could be applied to. Therefore, it must be possible to specify requirements that need to be verified manually. The required action for manually verified requirements may vary between projects.
More than one requirement may affect the same code. Therefore, it must be possible to specify more than one requirement at the same origin.
Only traces intended by developers must be detected, because falsely detected traces result in unreliable trace data. Therefore, traces found in commented code must be ignored, and language syntax should be used to further restrict trace detection.
If no language specific syntax can be used to trace requirements, the following syntax must be used inside comments:
[req(<requirement IDs>)]
Note: <requirement IDs> is used as placeholder for the actual IDs to trace with IDs being separated by ,.
Examples:
[req(req_id)]
[req(first_id, second_id)]
In case characters that are part of an ID are not allowed as identifiers in a programming language,
the ID may be wrapped in double quotes ". Only the ID part containing the special character(s) must be wrapped.
Examples:
[req("special-char-id".sub_id)]
As a developer, I want to see the impact of a code change to the trace data, before merging these changes, because this helps to identify if all needed changes were done, or some were wrongfully introduced.
A trace set on a code block in a programming language affects all lines of the code block. This code block line span must be stored in mantra to connect code coverage data with traces.
Example:
#[req(spanning_trace)]
fn some_fn() {
// ...
}Please create an issue if you found any spelling mistakes.
You may also create an issue if you think the content of this wiki should be improved.
Note: This wiki is managed in its own repository. Any commits made using the edit button will be overwritten.
Note: Issues for the wiki are handled in the mantra repository, but pull requests for the wiki are handled in the mantra-wiki repository.
This wiki is MIT licensed, and works together with mantra.