IntelliJ IDEA 2018.2 Help

Viewing and Exploring Test Results

After you run a test, the Run tool window will display the test runner tab with the results of your testing session. On this tab, you can view statistics of the tests, navigate to stack trace, show or hide successful tests, and more.

View statistics

  • To view the execution time for tests, click icons general gearPlain svg on the toolbar, and click the Show Inline Statistics option.
    JUnit Tool Window

View assertEquals difference

If a unit test contains string assertEquals failures, the IDE provides enables you to view differences between the compared strings.

  • Right-click the necessary test and select View assertEquals Difference form the context menu. You will be able to compare strings in the dedicated Differences viewer.

Jump to test declaration

  • Select the test from the suggestion list and press F4.

View results of previous tests

IntelliJ IDEA automatically saves results of 10 last tests.

  • To view them, click the artwork studio icons profiler toolbar clock icon, and select the necessary test from the list. For each test, the list displays the run configuration name and a time stamp.
    view test results

    You can also export test results to a file if you want to keep them or share with your team.

Export test results to a file

  • Click icons toolbarDecorator export svg on the test runner toolbar, select the format in which you want to save the file, and specify its name and location.

If you want to open this file later in IntelliJ IDEA, use the XML format.

To load the previously exported file, click Import from file and then select the required XML file in the dialog box that opens.

Last modified: 4 September 2018

See Also