PyCharm 2019.3 Help

Rerunning tests

You can repeat a test session or individual tests without leaving the Run tool window. The tests are performed again using the same run configuration as in the initial run.

Rerun a testing session

Press Ctrl+F5 or click the Rerun button the Run button on the toolbar of Test Runner tab.

Note that you can rerun the tests automatically.

Rerun an individual test

In the Test Runner tab, right-click a test case node or a test and select Run <test_target>.

Rerun failed tests

In the Test Runner tab, click the Rerun Failed Tests button the Rerun Failed Tests button on the toolbar.

Rerunning tests automatically

PyCharm lets you rerun run/debug configuration of a test automatically, if the source code has been changed. To enable autotest-like runner facility, make sure that the Toggle auto-test button the Toggle Auto-Test button in the Run toolbar of the Test Runner tab is pressed.

Debug failed tests

  1. Place a breakpoint in the failed test function.

  2. In the Test Runner tab, press Shift and click the Rerun Failed Tests button The Rerun Failed Tests button.

  3. Select Debug from the Restart Failed Tests popup.

    Rerun failed tests

The tests that have failed will be rerun in the debug mode.

Last modified: 2 April 2020