Creating run/debug configurations for tests
Selectfrom the main menu.
In the Run/Debug Configurations dialog, click on the toolbar or press Alt+Insert.
Select the testing framework that you use from the list (for example, JUnit or TestNG).
A new configuration page opens. Name this configuration.
From the Test kind list, select the scope for your tests: for an individual method or a class, for all tests in a package or a directory.
Depending on the selected test kind, specify the items that you want to run with this configuration.
For example, if you have seleted Method, specify the class and the method that IntelliJ IDEA is going to run in this configuration.
(Optionally) Switch to the Code Coverage tab and select a coverage runner.
Apply the changes and close the dialog.