AppCode 2020.2 Help

Test Runner tab

The Test Runner tab opens in the Run tool window when a testing session begins, and features the same toolbar buttons.

Test runner tab
  1. The run toolbar is almost the same as that for the Run tool window, but features testing-specific buttons.

  2. The left-hand pane shows the tree view of all tests within the current run/debug configuration.

    • The nested nodes represent the hierarchy of test suites and test cases.

    • The leaf nodes represent the individual tests.

    The status of each test is indicated by an icon. Double-click a node to open the respective test class or test method in the editor.

  3. The testing toolbar provides controls that enable you to monitor the tests and analyze results. Some of the commands are duplicated on the context menus of the test tree nodes.

  4. The output pane shows the output of the current test suit.

  5. The output pane toolbar provides controls for working with the stack trace, for example, navigating through the stack trace, printing it, or managing its views.

Run toolbar

ItemTooltip and ShortcutDescription
RerunRerun ⌃F5

Rerun the current test session.

The process reruns always in the same console regardless of whether this console is pinned or not.

Rerun Failed Tests buttonRerun Failed Tests

Rerun all failed tests.

If you press Shift and click this button, you can choose whether you want to Run the tests again, or Debug, for example, rerun the failed tests in the Debug mode.

StopStop ⌃F2Terminate the current process externally by means of the standard mechanisms.
Restore layoutRestore LayoutClick this button to have the changes to the current layout abandoned and return to the default state.
Pin buttonPinWhen this button is pressed, the current tab will not be overwritten; instead, the results of the next command will be displayed in a new tab.

Testing toolbar

ItemTooltip and ShortcutDescription
Show passedShow PassedShow tests that passed successfully.
Show ignoredShow Ignored

Show the ignored tests in the tree view of all tests within the current run/debug configuration or test class.

SortSort AlphabeticallySort tests in alphabetical order.
Sort by durationSort By DurationSort tests by duration.
Expand all Collapse all

Expand All/Collapse All

⌃+ ⌃-

Expand/collapse all nodes in the test tree view.

These buttons are only available if the tested application contains more than test case.

Previous failed test Next failed testPrevious/Next Failed Test
⌃⌥↑/⌃⌥↓
Navigate between the failed tests.
Test HistoryTest History

Open the list of internally saved results of test sessions. Each item is supplied with the name of the run configuration and a time stamp.

To view the results of a testing session from the AppCode history, select the item with the suitable run configuration and time stamp. The loaded test results are shown in a new tab, and the name of the corresponding run configuration is displayed in the title bar.

To re-run the tests from the loaded session, click Rerun.

Import Tests from FileImport Tests from File Load previously exported test results. This button opens a dialog in which you can select the required XML file with test results.
ExportExport Test Results Save the selected test to a file. In the Export Test Results dialog, specify the filename and format. If you want to view the test results later, choose the XML format.
Settings

Click this cog button to access the context menu with the following options:

  • Track Running Test: turn this option on to monitor execution of the current test. If a test suite contains multiple tests, the tree view of tests expands to show sequential test methods, as they are executed.

  • Show Inline Statistics: turn this option on to have the statistics shown next to a test result, displaying the time used for executing each test.

  • Scroll to Stack Trace: turn this option on to have the console scroll to the beginning of the trace of the last failed test.
    If you click the root node (the test package) in the tree view with this option turned off, the console will show the very beginning of the test.

    This option is helpful when a test package contains multiple test classes and test methods. If some of the tests fail, you can scroll in the console to the beginning of a stack trace of an exception or assertion.

  • Open Source at Exception: use this option to explore the results of a test that fails as an error, throwing an uncaught exception.
    If you double-click the failed test class or method in the tree view with this option turned on, the respective test class or method will open in the editor, with the caret placed at the line that caused the problem.

  • Navigate with Single Click: turn this option on to have the currently selected test in the tree view synchronized with the editor automatically.

  • Select First Failed Test When Finished: turn this option on to have the first failed test automatically selected in the tree view upon completing the tests.

Test status icons

IconDescription
Test errorTest error. This status is assigned to tests that caused an exception from the tested source code.
Test failedTest failed. If at least one test receives this status, then all its parents are marked as failed.
Test in progressTest in progress.
Test passedTest passed successfully.
TerminatedTest terminated. This status is assigned to tests that were cancelled by clicking the Stop button Stop button. If at least one test receives this status, then all unfinished tests and their parents are marked as terminated.

Output pane toolbar

This pane shows output of each test, generated at runtime, including all the messages sent to the output stream, and the error messages. The following table shows the toolbar buttons and context menu commands available for the Output pane.

ItemTooltip and ShortcutDescription
Previous

Up the stack trace

⌃⌥↓
Navigate up in the stack trace and have the cursor jump to the corresponding location in the source code.
NextDown the stack trace
⌃⌥↑
Navigate down in the stack trace and have the cursor jump to the corresponding location in the source code.
Use soft wrapsUse Soft WrapsToggle the soft wrap mode of the output.
Scroll to the endScroll to the endNavigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
PrintPrintConfigure printing out the console output in the Print dialog that opens.
Clear allClear AllDelete all messages for the selected test.

Context menu commands

CommandKeyboard shortcutDescription
Run <test name>⌃⇧F10 Run the selected test with the automatically generated run/debug configuration or choose another one from the list.
Debug <test name> Debug the selected test with the automatically generated run/debug configuration or choose another one from the list.
Run <test name> with Coverage⌃⇧F10 Run the selected test and collect coverage with the automatically generated run/debug configuration or choose another one from the list.
Create <test name>Create a run/debug configuration on the base of the selected test.
Jump to SourceF4Choose this command to move the focus to the editor, to the definition of a test class, or a test method.
Show Source⌃⏎Choose this command to open source code in the editor, but leave the focus with the Test Runner tab.
Last modified: 14 May 2020