rqm trace
rqm trace
rqm trace shows one requirement with the tests bound to it: where each test is declared, how it is bound, and what the latest run said about each of them. It also lists the links the requirement authored. It reads the sources and a run record and runs nothing.
rqm trace <id-or-uuid> [--run <id>]
The argument is the id, such as RQM-2, or the uuid of the requirement. A test is bound by an #[rqm("...")] marker on the test or by a selector in the tests list of the requirement. The BOUND column says which, or both. Binding tests to requirements explains the two ways.
$ rqm trace RQM-1
RQM-1 Users can sign in
run: none
TEST AT BOUND RESULT
sessions::tests::sign_in_with_a_valid_password src/lib.rs:36 selector -
sessions::tests::sign_in_with_a_wrong_password src/lib.rs:42 selector -
note: rqm shows that the evidence meets the declared policy. It does not show that the tests are adequate.
The AT column is the file and line of the declaration. A selector that names a test that the scan has no declaration of is still listed, and AT says (not in the scanned sources).
When a run record exists, the run: line names the run, whether it saw the requirement as it is now (current) or before it was changed (superseded), and the run evaluation of the requirement. The RESULT column then gives the result of each test in that run: passed, flaky, skipped, failed, errored, or not_in_run when the run credited no case of the test to the requirement. Without a run record the line reads run: none and RESULT is -. --run <id> takes the results from another run instead of the latest one, and an unknown run is E-RUN-NOT-FOUND.
A requirement that links to another lists it under links:, with its id and title, exactly as authored. trace never adds the reciprocal link.
The last line is the same sentence that every output with a label carries: rqm shows that the evidence meets the declared policy, not that the tests are adequate.
Options
$ rqm trace --help
List the tests bound to one requirement, where they are and what the latest run said about them
Usage: rqm trace [OPTIONS] <REQUIREMENT>
Arguments:
<REQUIREMENT> The id (`RQM-12`) or the uuid of the requirement
Options:
--format <FORMAT> Output format. JSON is the stable contract [default: human] [possible values: human, json]
--run <ID> Take the results from this run instead of the latest one
--strict Treat warnings as errors for the exit code. The output itself does not change
-h, --help Print help
The data of --format json is described in The JSON output.