Is there a way to only run integration tests, but not unit-tests?
I've tried:
cargo test --tests
: runs unit + integration tests
cargo test --test test_name
: runs one specified test
Is it currently not possible to only run integration tests or am I missing something?
You can run ONLY the integration tests by:
cargo test --test '*'
Please note that only '*'
will work; neither *
nor "*"
works.
Reference: https://github.com/rust-lang/cargo/issues/8396
I would like to supplement answer.
If you need to run only ONE integration test method (e.g. 'integration_test_method') you can do that by following command:
cargo test --test integration_tests 'integration_test_method'
RUST_LOG=DEBUG RUST_BACKTRACE=full cargo test --test integration_tests 'integration_test_method' -- --exact --show-output --nocapture
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With