Open the Run tool window: View | Tool Windows | Run (Alt04)
tip
To aid test-driven development, once you have run a test at least once, RustRover will track any assertion failures, panics, or failed calls within the test and warn you if they occur.
This behavior is turned on by default. However, you can always disable it: go to Settings | Editor | Inspection, expand the Rust section, locate the Failed line in test inspection, and clear the checkbox next to it.
While the tests are running in RustRover, the test execution is shown in the Run tool window on a tab for that run configuration. When the test execution is finished, you can look at the test results in that tab.
warning
Turn off output formatting to avoid inconsistent test results
To support Rust 1.70.0 on the stable channel, the IDE provides cargo test with the RUSTC_BOOTSTRAP=1 environment variable. This enables structured output in the Test Tool window but may impact build and test results in rare cases.
If you prefer unformatted output and want to avoid potential inconsistencies, go to Settings | Advanced Settings and clear the Show test results in the Test tool window checkbox.
The console on the right shows the output of the current test session. It allows you to see the detailed information on the test execution and why your tests failed or were ignored.
note
If you have the AI assistant plugin installed and enabled, you will see an Explain with AI button for each panic message.
Next to each test on the run configuration tab, the IDE shows the test status icon:
Icon
Description
Test error. This status is assigned to tests that caused an exception from the tested source code.
Test failed. If at least one child test fails, all its parent tests are marked as failed.
Test ignored.
Test in progress.
Test passed successfully.
Test terminated. This status is assigned to tests that were stopped.
If at least one test receives this status, then all unfinished tests and their parent tests are marked as terminated.
Use the following options on the test results toolbar if you want to focus only on the failed tests or if you want to reorganize test results.
Disable the Show Passed option to hide successful tests.
Disable the Show Ignored option to hide ignored tests.
Click and select how you want to sort the test results:
Suites Always on Top – click to display suites on top.
Sort Alphabetically – click to sort test results alphabetically.
Sort by Duration – click to place test nodes on top of the list.
Manage test results
Click on the test results toolbar then select Test Runner Settings and enable the following options:
Track Running Test: monitor execution of the current test.
Show Inline Statistics: view the execution time for tests.
Scroll to Stack Trace: if a test produced a lot of output (for example, logging) before failing, this option automatically scrolls the output console to the assertion failure once you select the test on the run configuration tab.
Open Source at Exception: if you double-click a failed test method on the run configuration tab with this option on, the editor will scroll to the line on which the exception was thrown (instead of scrolling to the test method declaration).
Navigate with Single Click: open the code for the selected test automatically in the editor.
Set Auto Test Delay: point to this node to reveal the list of available delays between file saving and rerunning tests. The selected value gets the check mark.
Select First Failed Test When Finished: automatically select the first failed test in the list upon completing the test session.
Jump to test declaration
Select the necessary test from the list on the Test Runner tab and press F4. Alternatively, right-click the test and select Jump to Source.