runTests()

Run your Apex unit tests.

To facilitate the development of robust, error-free code, Apex supports the creation and execution of unit tests. Unit tests are class methods that verify whether a particular piece of code is working properly. Unit test methods take no arguments, commit no data to the database, and send no emails. Such methods are flagged with the @isTest annotation in the method definition. Unit test methods must be defined in test classes, that is, classes annotated with @isTest. Use this call to run your Apex unit tests.

This call supports the DebuggingHeader and the SessionHeader.

NameTypeDescription
requestRunTestsRequestA request that includes the Apex unit tests and the values for any fields that need to be set for this request.

RunTestsResult