---
schema_version: "1"
id: 81a5732eb97adc128e00cca46005295cf0acb4287a6251f987015a07ed025fe8
title: ApexTestResultLimits
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_apextestresultlimits.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apextestresultlimits.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c530e7c2f870f4bfd1749a695e4290360445ebe8f67f83153fbf69495d46dc99
description: Captures the Apex test limits used for a particular test method execution. An instance of this object is associated with each ApexTestResult object. Available from API version 37.0 or later.
---
# ApexTestResultLimits

Captures the Apex test limits used for a particular test method execution. An instance of this object is associated with each ApexTestResult object. Available from API version 37.0 or later.

## Supported SOAP API Calls

create(), delete(), describeSObjects(), query(), retrieve(), update()

## Supported REST API HTTP Methods

Query, GET

## Fields

| Field Name | Details |
| --- | --- |
| ApexTestResultId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the associated ApexTestResult object.





 |
| AsyncCalls | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of asynchronous calls made during the test run.





 |
| Callouts | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of callouts made during the test run.





 |
| Cpu | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The amount of CPU used during the test run, in milliseconds.





 |
| Dml | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of DML statements made during the test run.





 |
| DmlRows | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of rows accessed by DML statements during the test run.





 |
| Email | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of email invocations made during the test run.



 |
| LimitContext | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Indicates whether the test run was synchronous or asynchronous.





 |
| LimitExceptions | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Indicates whether your org has any limits that differ from the default limits.





 |
| MobilePush | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of mobile push calls made during the test run.





 |
| QueryRows | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of rows queried during the test run.





 |
| Soql | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of SOQL queries made during the test run.





 |
| Sosl | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The number of SOSL queries made during the test run.





 |

## Usage

The ApexTestResultLimits object is populated for each test method execution, and it captures the limits used between the Test.startTest() and Test.stopTest() methods. If startTest() and stopTest() aren’t called, limits usage is not captured. Note the following:

- The associated test method must be run asynchronously.
- Limits for asynchronous Apex operations (batch, scheduled, future, and queueable) that are called within test methods are not captured.
- Limits are captured only for the default namespace.