+ Start a Discussion
Jake IrvinJake Irvin 

Create Apex Test Suite in Eclipse

I'm using the Salesforce IDE plugin in Eclipse, and I can't figure out how to create a test suite and add test classes to that suite. I can run individual test classes just fine though. Thanks in advance for you help!
Best Answer chosen by Jake Irvin
SandhyaSandhya (Salesforce Developers) 
Hi Jake,


A test suite is a collection of Apex test classes that you run together. For example, create a suite of tests that you run every time you prepare for a deployment or Salesforce releases a new version. Set up a test suite in the Developer Console to define a set of test classes that you execute together regularly.
In the Developer Console, select Test | New Suite.

Enter a name for your test suite, and then click OK.

Use the arrows to move classes between the Available Test Classes column and the Selected Test Classes column, and then clickSave.

To change which classes are in a test suite, select Test | Suite Manager | Your Test Suite | Edit Suite.

Use the arrows to move classes between the Available Test Classes column and the Selected Test Classes column, and then click Save.

To run suites of test classes, select Test | New Suite Run.


Please accept my solution as Best Answer if my answer was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
 
Thanks and Regards
Sandhya

 
 

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi Jake,


A test suite is a collection of Apex test classes that you run together. For example, create a suite of tests that you run every time you prepare for a deployment or Salesforce releases a new version. Set up a test suite in the Developer Console to define a set of test classes that you execute together regularly.
In the Developer Console, select Test | New Suite.

Enter a name for your test suite, and then click OK.

Use the arrows to move classes between the Available Test Classes column and the Selected Test Classes column, and then clickSave.

To change which classes are in a test suite, select Test | Suite Manager | Your Test Suite | Edit Suite.

Use the arrows to move classes between the Available Test Classes column and the Selected Test Classes column, and then click Save.

To run suites of test classes, select Test | New Suite Run.


Please accept my solution as Best Answer if my answer was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
 
Thanks and Regards
Sandhya

 
 
This was selected as the best answer
Jossy GeorgeJossy George
I don't think you can create Suites in eclipse but you can group test classes that you run together in a single run configuration.
Kevin GallKevin Gall
As per this link: https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/ide_apex_unit_tests.htm you can create test suites in the Eclipse plugin. I downvoted the "accepted" answer because it didn't actually answer the question of how to create a test suite in Eclipse: it talked about the web-based Developer Console.

As Jossy George says, you can group test classes together in a single Run Configuration. I'm relatively new to developing using Force.com IDE, but it looks like you can edit test suites in the Run Config menu... though even if that's true, it's not intuitive, FYI.

But at any rate, still possible.
Sid RoySid Roy
Yes, test classes can be combined in a test suite in Force.com IDE. Please check the attached screenshot for reference.User-added image