PhpStorm 2019.2 Help

Creating run/debug configurations for tests

To run tests in PhpStorm, 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

  1. Select Run | Edit Configuration from the main menu.

  2. In the Run/Debug Configurations dialog, click the Add New Configuration icon on the toolbar or press Alt+Insert. Select configuration for your testing framework: Boost.Test, Catch, Google Test, or XCTest.

    Add run/debug configuration for tests

  3. 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

  4. 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. PhpStorm 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 test configuration creation, PhpStorm supports creating test configurations for specific targets, for example for all tests in a file, class, or directory, or for an arbitrary selection of test classes and methods.

Create a test configuration

  1. Open the Run/Debug Configuration dialog by doing one of the following:

    • From the main menu, choose Run | Edit Configurations.

    • Press Shift+Alt+F10 and select Edit Configuration from the context menu.

  2. Click Add New Configuration on the toolbar and select the desired configuration type:
  3. In the dialog that opens, specify the test scope, configuration parameters, and activities to perform before test execution. Apply the changes and close the dialog.

Create a test configuration for a specific target

  1. In the Project tool window, right-click the desired test directory, individual file, or class.

  2. From the context menu of the selection, choose Create Run configuration.


  3. In the Run/Debug Configuration dialog that opens, specify the configuration parameters and activities to perform before test execution. Apply the changes and close the dialog.

Last modified: 22 October 2019