Test Suites – Salesforce? How to create test suite

What is test suites in Salesforce?

Test suite is a collection of test classes that you can run together. If you are working on 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 test suites?

  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 list of classes you want 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.

Leave a Reply