Creating run/debug configurations for tests
To run tests in PyCharm, you need to create a special run/debug configuration for the testing framework that you use.
Test run/debug configurations are synchronized with Xcodes schemes. All changes in them are propagated automatically.
Create run/debug configuration for tests
Selectfrom the main menu.
In the Run/Debug Configurations dialog, click on the toolbar or press Alt+Insert. Select configuration for your testing framework: Boost.Test, Catch, Google Test, or XCTest.
Depending on the testing frameworks, select the test type: Class/method or Patternfor XCTest, Suite/Test or Pattern for Google Test and Boost, or Tags/Test
Specify the class/method, suit/test,
You can run your tests (test cases, test suites, and so on) You can run your tests using run/debug configurations, in the way similar to running ordinary applications. PyCharm provides a framework for creating special run/debug configurations for testing purposes, where a test can be specified as a target.
In addition to the regular procedure described in the section Creating and Editing Run/Debug Configuration, PyCharm provides a shortcut that allows you to create run/debug configurations for all tests in a container, for a single test case, or even for a test method.
Creating a test configuration
Right-click the desired target, for example a directory or an individual test in the Project tool window. In case of an individual test, you can open it in the editor, and right-click the background.
From the context menu of the selection, choosefor an individual test:
In the dialog that opens, specify the run/debug configuration parameters, apply changes and close the dialog.
Ctrl+Space code completion works in run/debug configuration dialog boxes, for example in the Working directory field.