{"id":"31af5f63-bc23-4e3e-a929-2fa68c762b1b","task":"Run Rust tests with cargo test: filter by name, show output, control parallelism, doc-tests","domain":"doc.rust-lang.org","steps":["Run `cargo test` to build and run all unit tests, integration tests (tests/ dir), and doc-tests.","Filter by substring: `cargo test parse` runs every test whose name contains 'parse'.","Flags after `--` go to the test harness, not cargo: `cargo test -- --show-output` prints stdout of passing tests; `cargo test -- --test-threads=1` disables parallel test execution.","Scope selection: `cargo test --lib` (unit tests only), `cargo test --test <name>` (one integration test target), `cargo test --doc` (doc-tests only), `cargo test --workspace` (all workspace members).","Docs: https://doc.rust-lang.org/cargo/commands/cargo-test.html"],"gotchas":["Test stdout is captured by default and only shown for failures; use `-- --show-output` for passing-test output. The old `--nocapture` harness flag is now spelled `--no-capture` on current toolchains.","Tests run in parallel by default — tests sharing files, ports, env vars, or a database will flake until you isolate them or use `-- --test-threads=1`.","Integration tests live in tests/ as separate crates: they can only call your crate's public API, and each file is compiled as its own binary.","Doc-tests compile every ``` code block in doc comments; mark blocks ```no_run (compile only) or ```ignore to skip."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T01:49:41.119Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T01:49:41.119Z"},"url":"https://mcp.waymark.network/r/31af5f63-bc23-4e3e-a929-2fa68c762b1b"}