Start test execution

Starts a new asynchronous execution of the specified test.

URL

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

Method

POST

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.

Request body

Name Default Description

testKey*


The repository key of the automation test file stored in the test repository area. For example, PUBLIC:deviceMonitoring.xml or PRIVATE:android/test.xml.

params


The name and value of one or more run-time parameters for the test, passed as JSON. For example, to specify an integer parameter called timeout with the value 10, add "params": {"timeout": 10} to the URL.

When using an API call to invoke Scriptless Mobile tests, make sure the Device parameter is set. If the Device parameter is not set, the API call will pass, but the test will not start.

You can set the Device parameter through the Scriptless Mobile UI or in the API call.

To hard-code the parameter in Scriptless Mobile, on the top toolbar, use the Configure test variables button . To learn more, see Configure test variables.

securedParams


The name and value of one or more secured run-time parameters for the test, passed as JSON.

For example, to specify a string parameter called password with the value z5VwobV/vjZYZKt6Lu6IOQ, add "securedParams": {"password": "z5VwobV/vjZYZKt6Lu6IOQ"} to the request body.

* Mandatory

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.

testGridReportUrl

The Perfecto report library URL.

Success response

Code: 201 Created

Examples

These examples shows the request and response for starting the execution of a test.

Copy
Example 1: Request body
{
    "testKey": "PUBLIC:Start Calculator.xml"
Copy

Example 2: Request body

{
  "testKey": "PRIVATE:Open Expense Tracker.xml",
  "params": {
    "DUT": "00008120-0006035C2182601E",
    "application": "com.apple.calculator"
  }
}
Copy

Example 3: Response

{
    "executionId": "282030d2-4718-47b6-9013-a5681cd8796a",
    "testGridReportUrl": "https://codeless-dev.app.perfectomobile.com/reporting/library?externalId[0]=282030d2-4718-47b6-9013-a5681cd8796a"
}