Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ApexTestResult
Supported SOAP API Calls
create(), delete(), describeSObjects(), query(), retrieve(), update()
Supported REST API HTTP Methods
Query, GET
Fields
| Field Name | Details |
|---|---|
| ApexClassId |
|
| ApexLogId |
|
| ApexTestRunResultId |
|
| AsyncApexJobId |
|
| IsTestSetup |
|
| Message |
|
| MethodName |
|
| Outcome |
|
| QueueItemId |
|
| RunTime |
|
| StackTrace |
|
| TestCategory |
|
| TestName |
|
| TestNamespace |
|
| TestTimestamp |
|
Usage
You can query the fields of the ApexTestResult record that corresponds to a test method executed as part of an Apex class execution.
Each ApexTestResult record represents a single test method execution. For example, if an Apex test class contains six test methods, six ApexTestResult records are created. These records are in addition to the ApexTestQueueItem record that represents the Apex class.
Each ApexTestResult record has an associated ApexTestResultLimits record, which captures the Apex limits used during execution of the test method.
For example code, see ApexTestQueueItem.