Newer Version Available
runTests()
Run your Apex unit tests.
Syntax
Usage
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.
Sample Code—Java
Arguments
| Name | Type | Description |
|---|---|---|
| request | RunTestsRequest | A request that includes the Apex unit tests and the values for any fields that need to be set for this request. |