rqm tests
rqm tests
rqm tests lists the Rust tests that rqm found in your code, and the requirements that claim each of them. It reads the sources, runs nothing and needs no network.
rqm tests
$ rqm tests
TEST AT REQUIREMENTS
sessions::tests::sign_in_with_a_valid_password src/lib.rs:36 RQM-1
sessions::tests::sign_in_with_a_wrong_password src/lib.rs:42 RQM-1
2 tests in 1 targets, 2 claimed by a requirement
Each line is one test: its identity, the file and line of the function, and the requirements that claim it, either through a selector in the requirement or through an #[rqm("...")] marker on the test. A dash means that no requirement claims the test. Binding tests to requirements explains both ways, and docs/IDENTITY.md (the reference page on test identities) explains the form of the identity.
The scan follows the mod declarations of every target that Cargo knows, so it finds the tests in module files too. It starts cargo metadata to learn the targets, and that is the only program it starts.
Options
$ rqm tests --help
List the Rust tests that the source scan found and the requirements that claim them
Usage: rqm tests [OPTIONS]
Options:
--format <FORMAT> Output format. JSON is the stable contract [default: human] [possible values: human, json]
--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.