Search code examples
intellij-idearustclionrust-cargo

How to set the --nocapture flag for all Rust/Cargo tests in IntelliJ?


Is there a way to make IntelliJ's/CLion's Rust plugin use the --nocapture flag for Rust tests?

I see I could create a "Run" configuration for each test, but that's not scalable.

Also, IntelliJ used to print the Cargo command it was running for tests. Now the output window just shows Testing started at 15:31 ...


Solution

  • You can customise the template for all configurations. Please enable Show stdout/stderr in tests (and disable tool window) option on the Run | Edit Configurations tab: screenshot