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, send no emails, and are flagged with the testMethod keyword or the isTest annotation in the method definition. Also, 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. For more information about the SOAP headers in the API, see the SOAP API Developer's Guide.
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. |