我怎样才能只运行集成测试

jsc*_*chw 18 rust

有没有办法只运行集成测试而不运行单元测试?

我试过了:

cargo test --tests:运行单元+集成测试

cargo test --test test_name:运行一项指定的测试

目前是否无法仅运行集成测试,或者我是否遗漏了某些内容?

Ala*_*eng 31

您只能通过以下方式运行集成测试:

cargo test --test '*'
Run Code Online (Sandbox Code Playgroud)

请注意,只有这样'*'才有效;既不工作*也不"*"工作。

参考: https: //github.com/rust-lang/cargo/issues/8396