PyCharm 2017.3 Help

Monitoring and Managing Tests

Test progress and results display in the dedicated test runner tabs of the Run tool window.

/help/img/idea/2017.3/py_test_runner_tab.png

where:

  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 root node represents the test selected to run.
    • 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 inline statistics show the list of executed tests with the execution time of each test.
  6. The color of the status bar indicates whether the tests have passed successfully. If at least one of the tests fails, the status bar turns red.

You can rerun, terminate, and suspend execution of tests same way as you do it for running applications. In addition to the common running actions, in the test runner you can:

  • Navigate through the list of test cases using arrow keys.
  • Navigate between failed tests using the /help/img/idea/2017.3/arrowDown.png and /help/img/idea/2017.3/arrowUp.png buttons or Ctrl+Alt+Up or Ctrl+Alt+Down keyboard shortcuts.
  • View the total number of tests being run in the current session. The summary information is displayed in a message line on the top of the tool window. After completion of the tests, the message informs you about the number of failed tests and elapsed time.
  • View testing progress in the progress bar.
  • Show or hide information about the passed tests, using the /help/img/idea/2017.3/testPassed.png button.
  • Show the ignored tests in the tree view of all tests within the current run/debug configuration or test class using the /help/img/idea/2017.3/testIgnored.png button.
  • Navigate from the stack trace to the problem location in the source code by clicking the hyperlink in the Output pane.
  • Enable and disable the following functionality by clicking the cog button projectToolWindowSettingsIcon.png and selecting the relevant items from the context menu:
    • Monitoring execution of the current test.
    • Have the first failed test selected automatically upon completing the suit.
    • Navigating to the stack trace.
    • Automatic scrolling to the source code.
    • Have the corresponding source code opened at exceptions.
    • Have statistic shown in the Statistics pane.

See Also

Reference:

Last modified: 15 September 2017