ApexTestRunResult

Contains summary information about all the test methods that were run in a particular Apex job.

Version 

Introduced in API version 37.0.

Supported SOAP API Calls 

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

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

AsyncApexJobId 

  • Type: reference

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The parent Apex job ID for the result.

  • Relationship name: AsyncApexJob

  • Relationship type: relationship

  • Refers to: AsyncApexJob

ClassesCompleted 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The total number of classes executed during the test run.

ClassesEnqueued 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: The total number of classes enqueued during the test run.

EndTime 

  • Type: datetime

  • Required: No

  • Properties: Create, Filter, Nillable, Sort, Update

  • Description: The time at which the test run ended.

IsAllTests 

  • Type: boolean

  • Required: No

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: Indicates whether all Apex test classes were run.

  • Default value: false

JobName 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: Reserved for future use.

MethodsCompleted 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The total number of methods completed during the test run. This value is updated after each class is run.

MethodsEnqueued 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The total number of methods enqueued for the test run. This value is initialized before the test runs.

MethodsFailed 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The total number of methods that failed during this test run. This value is updated after each class is run.

Source 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The source of the test run, such as the Developer Console.

StartTime 

  • Type: datetime

  • Required: No

  • Properties: Create, Filter, Sort, Update

  • Description: The time at which the test run started.

Status 

  • Type: picklist

  • Required: No

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Description: The status of the test run. Can be one of these values:

  • Queued

  • Preparing

  • Processing

  • Aborted

  • Completed

  • Failed

  • Possible values:

    • Queued — Queued

    • Processing — Processing

    • Aborted — Aborted

    • Completed — Completed

    • Failed — Failed

    • Preparing — Preparing

    • Holding — Holding

TestSetupTime 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 61.0

  • Description: The time it took the setup methods to run, in milliseconds.

TestTime 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The time it took the test to run, in milliseconds.

UserId 

  • Type: reference

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The user who ran the test run.

  • Relationship name: User

  • Relationship type: relationship

  • Refers to: User

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!