Explore test results
After RustRover finishes running your tests, it shows the results in the Run tool window on the Test Runner tab.
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.
Next to each test on the Test Runner 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. |
The Test Runner toolbar on the top allows you to sort and filter test results, define output format, jump to a test's declaration and view test history. Here you can also stop or rerun the test session in one click.
Sort and filter test results
Use the following options on the Test Runner 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 to sort test results alphabetically.
Click to sort test results by duration.
Manage test results
On the Test Runner toolbar, click the three dots icon, and under Test Runner Settings, choose from 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 Test Runner tab.
Open Source at Exception: if you double-click a failed test method on the Test Runner 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.
View assertEquals difference
If a unit test contains string assertEquals
failures, the IDE allows you to compare the strings and view the differences.
Right-click the necessary test and select Diff Viewer.
from the context menu. You will be able to compare strings in the dedicated
View results of previous tests
RustRover automatically saves results of the last 10 test sessions. To open the list of recent test sessions:
Click the icon on the Test Runner toolbar and select the necessary test session from the list.
For each test session, the list displays the run configuration name and a timestamp: