What are Test Suites in Salesforce?

A Test Suite is a collection of test classes that you can run together. If you are working on a specific set of test classes and running regularly, create a test suite with the list of test classes that you want to execute and run that test suite instead of running each class individually. And you can use this test suite regularly to run the list of test classes again and again. We can create test suites in the developer console.

How to create a Test Suite?

  1. To create test Suite, go to developer console -> Select tab “Test” -> click New suite see the below image for reference.

Test Suite 1

2. Enter Suite name and click on ok. See the below image for reference.

Test Suite 2

3. Add the classes, you want to execute, from available test classes section to selected test classes. See the below image for reference.

Test Suites

Use arrows which are highlighted with yellow color to move classes from one list to other. Only one test class is there in this list. You will more test classes if there are more on your Salesforce org.

How to run test suites?

To run test suite, in developer console go to tab “Test” and click on New Test Suite run and select the test suite you want to execute and click on “Run suites” button.