Get test execution status

Gets the status of the running or recently completed execution specified by the <executionId>.

The <executionId> is the execution identifier returned by the Start test execution operation.

Request syntax

Copy
https://<tenant-name>.perfectomobile.com/scriptless/api/executions/<execution-id>

Method

GET

Header parameters

Name

Description

Perfecto-Authorization

The Perfecto security token. For more information, see Generate a security token.

Important: All REST API commands require authentication. See the general authentication methods in Authentication and authorization.

Response

Name Description
executionId

The unique identifier that you can use to get the status of the running script or abort it. The identifier is only valid during, and for a short period after the test execution.

tenantId The identifier for the tenant or cloud that started the execution.
userId The identifier for the user that started the execution.

reportKey 

The identifier that you can use to download the execution report from the repository. The key is only valid once the script's execution completes and does not expire. For example, PRIVATE:reportName.xml.

status

The current status of the execution. The following is a list of the possible return values:

  • Initializing: The execution is initializing and preparing to run the specified script

  • Waiting for resources: The execution is awaiting resources required by the script

  • Running: The execution is performing the functions coded in the script

  • Terminating: The execution completed the last function in the script and is performing cleanup operations, e.g. finalizing the video, updating data structures, releasing resources.

  • Completed: The execution has completed and is no longer running

progressPercentage

The progress percentage of the running execution.

devices

The information of the devices used in the script. Includes the id, manufacturer and model.

description

The description of the current execution status.

endCode

The completion code of the execution. The following is a list of the possible return values:

  • Success

  • Failed

  • UserAborted

numberOfFailedCommands The count of failed commands.

completionDescription

The description of the execution completion status.

parent

If the execution was invoked by another execution, this field contains the execution identifier of the parent execution. This field can be used to identify child executions, or to query the status of a parent execution.

Example

This example shows the request and response for getting the status of the execution with the specified <executionId> .

Copy

Request

https://demo.perfectomobile.com/scriptless/api/executions/533f8979-d17c-47de-a62f-17ff7b66935f
Copy

JSON response (status: Initializing)

    {
    "executionId": "533f8979-d17c-47de-a62f-17ff7b66935f",
    "tenantId": "test-perfectomobile-com",
    "userId": "user-name@perforce.com",
    "reportKey": "https://test.app.perfectomobile.com/reporting/library?externalId[0]=533f8979-d17c-47de-a62f-17ff7b66935f",
    "status": "Initializing",
    "progressPercentage": 0,
    "devices": [],
    "description": "Execution is initializing",
    "numberOfFailedCommands": 0,
    "tracking": {
        "createdAt": 1756129826644,
        "lastUpdatedAt": 1756129826644
    }
}
Copy

JSON response (status: Running)

{
    "executionId": "533f8979-d17c-47de-a62f-17ff7b66935f",
    "tenantId": "test-perfectomobile-com",
    "userId": "user-name@perforce.com",
    "reportKey": "https://test.app.perfectomobile.com/reporting/library?externalId[0]=533f8979-d17c-47de-a62f-17ff7b66935f",
    "status": "Running",
    "progressPercentage": 0,
    "devices": [
        {
            "deviceName": "00008110-0014516422EA801E",
            "platformName": "iOS",
            "platformVersion": "15.0"
        }
    ],
    "description": "Execution is running",
    "numberOfFailedCommands": 0,
    "tracking": {
        "createdAt": 1756129826644,
        "lastUpdatedAt": 1756129875254
    }
}