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.
ApexTestQueueItem
This object is available in API version 23.0 and later.
Supported Calls
create(), describeSObjects(), query(), retrieve(), update(), upsert()
Special Access Rules
In API version 49.0 and later, users must have the View Setup and Configuration permission to access this object.
Fields
| Field Name | Description |
|---|---|
| ApexClassId |
|
| ExtendedStatus |
|
| ParentJobId |
|
| ShouldSkipCodeCoverage |
|
| Status |
|
| TestRunResultId |
|
Usage
Insert an ApexTestQueueItem object to place its corresponding Apex class in the Apex job queue for execution. The Apex job executes the test methods in the class.
To abort a class that is in the Apex job queue, perform an update operation on the ApexTestQueueItem object and set its Status field to Aborted.
If you insert multiple Apex test queue items in a single bulk operation, the queue items share the same parent job. This means that a test run can consist of the execution of the tests of several classes if all the test queue items are inserted in the same bulk operation.