To run all tests or specific test classes we can use both the APIs SOAP and Rest API. Below are the differences that I noticed when done research on both.
- All test
- SOAP - Possible, Without mentioning a list of test classes
- REST - Not possible, You have to specify all classes that you want to run
- SOAP - Provide classes to handle test run results which makes it easy to get list of failed and passed test classes
- REST - Need to handle the JSON response by our own.
I want to run test classes from Apex code and based on that my requirements are,
To get a list of the failed, passed and aborted test classes list.
I should be able to run all tests with/without mentioning all classes.