Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status of the API Run

This API enabled us to get the status of the Espresso/XCUI test run.

...

Code Block
languagexml
titleResponse
Response Status: 200 OK
[
    {
  		"status": "SUCCESS",
  		"data": {
    		"Test Run Id": "3520316",
    		"Test Run State": "Finished",
    		"Total number of tests": "11",
    		"Number of passed tests": "3",
    		"Number of failed tests": "8",
   			"Number of skipped tests": "0",
    		"Number of running tests": "0",
    		"Number of queued tests": "0",
			"Number of ignored tests" : "0",
    		"Link to Reporter": "https://CLOUD_SERVER/reporter/#/test-view-view/-1?testView={%22byKey%22:%22test.run.id%22,%22byKeyValue%22:%223520316%22}"
  		},
  	"code": "OK"
	}
]
Info

"Number of skipped tests" - tests that were not executed because of timeout/cancellation.

"Number of ignored tests" - tests that were not executed because they were ignored by the user (ignoreTestFile parameter)

Running Async Espresso/XCUITest

...

The number

Name

Type

Mandatory

Description

executionTypeStringYes

Specified if its Espresso or XCUITest

runningType StringYes

coverage / fastFeedback

  1. Coverage - all of the tests will be executed on all of the selected devices.

  2. Fast feedback - all of the tests will be spread across the selected devices.

appFileYesApplication under test
testAppFileYesespresso / XCUI tests.
deviceQueries StringYescreationTimeoutLongNo

For coverage mode:

List of strings (XPath queries). The test run should run on devices that match provided queries (device per query).

Multiple queries should be passed in the standard way by repeating the parameter multiple times.

uuidStringNoProvision profile UUID to sign the Application and the test application.
runTagsStringNoMap as JSON - wanted tags to upload to the reporter.
overallTimeoutLongNo

The number of milliseconds.

Timeout for the overall test run. If not provided - default value (14,400,000) - 4 hours - should be used.

For Fast Feedback:

Only one device query must be provided on the list.

The number of devices used is decided by maxDevices and minDevices parameters.

If the maxDevices parameter is not provided then the execution will try to reserve the maximum number of devices according to license restriction.

It is recommended to use maxDevices parameter always

uuidStringNo

Provision profile UUID to sign the Application and the test application.

Relevant to iOS execution-only

runTagsStringNoMap as JSON - wanted tags to upload to the reporter.
overallTimeoutLongNo

The number of milliseconds.

Timeout for test requests in queued statusthe overall test run. If not provided - default value (14,400,000) - 4 hours - should be used.

ignoreTestFilecreationTimeoutFileLongNo

The file should include ignoring tests.

iOS -

number of milliseconds.

Timeout for test requests in queued status. If not provided - default value (14,400,000) - 4 hours - should be used.

ignoreTestFileFileNo

This file specifies the tests to exclude.

iOS

  • xcscheme file

Android

- txt file which includes

  • the file containing full class
name
  • and method name
with the format below:
full_class_name, method name
full_class_name2, method name2
  • , separated with comma, e.g.
Code Block
com.example.app.SomeTest, testFoo
com.example.app.AnotherTest, testBar
maxDevicesInteger No 

The maximum number of devices to use during the execution. default value - max available devices license.

Note: Only use in case of fastFeedback

minDevicesInteger No

The minimum number of devices to use during the execution.

Default value - 1.

Note: Only use in case of fastFeedback

retry Integer No

Integer from 0 to 5 -

Specifies how many times failed test should be retried

Default Value -  0 (means no retry)

...

additionalAppIds

...

List of Longs

...

{
    "status": "SUCCESS",
    "data": {
        "Test Run Id": "3520546",
        "Link to Reporter": "https://CLOUD_SERVER/reporter/#/test-view-view/-1?testView={%22byKey%22:%22test.run.id%22,%22byKeyValue%22:%223520546%22}"
    },
    "code": "OK"
}

Running Sync Espresso/XCUITest

Enables users to run Espresso or XCUITest synchronously, the response received is after the test run.

...

Parameters

Name

Type

Mandatory

Description

executionTypeStringYes

Specified if its Espresso or XCUITest

runningType StringYes

coverage / fastFeedback

  1. Coverage - all of the tests will be executed on all of the selected devices.

  2. Fast feedback - all of the tests will be spread across the selected devices.

appFileYesApplication under test
testAppFileYesespresso / XCUI tests.
deviceQueries StringYes

List of strings (XPath queries). The test run should run on devices that match provided queries (device per query).

Multiple queries should be passed in the standard way by repeating the parameter multiple times.

uuidStringNoProvision profile UUID to sign the Application and the test application.
runTagsStringNoMap as JSON - wanted tags to upload to the reporter.
overallTimeoutLongNo

The number of milliseconds.

Timeout for the overall test run. If not provided - default value (14,400,000) - 4 hours - should be used.

creationTimeoutLongNo

The number of milliseconds.

Timeout for test requests in queued status. If not provided - default value (14,400,000) - 4 hours - should be used.

ignoreTestFileFileNo

The file should include ignoring tests.

  • iOS - xcscheme file
  • Android - txt file which includes full class name and method name with the format below:
    full_class_name, method name
    full_class_name2, method name2
maxDevicesInteger No 

The maximum number of devices to use during the execution. default value - max available devices license.

Note: Only use in case of fastFeedback

minDevicesInteger No

The minimum number of devices to use during the execution.

Default value - 1.

Note: Only use in case of fastFeedback

retry Integer No

An integer from 0 to 5 -

Specifies how many times failed test should be retried

Default Value -  0 (means no retry)No

List of application ids that should be installed on the device/emulator before starting the Espresso/XCUI test.

Application id is returned when uploading application with Rest API or using the Get Applications REST API.

retryDifferentDevice

boolean

No

A boolean value which specifies whether or not to run a failed test on different devices according to "retry" value.

Default Value -  false (means will not try to run a failed test on different devices).

If "maxDevices" is specified,  then "retry" might be limited to the min between ("maxDevices" - 1) and "retry". 

useUIAutomatorbooleanNoFor Android only
A boolean value which decides whether or not to disable Experitest's UIAutomator.
Default Value = false - UIAutomator will not be disabled.
True - UiAutomator will be disabled on Test Start and will be enabled after it ends
useTestOrchestratorbooleanNoFor Android only
A boolean value which decides whether or not to run the test in Test Orchestrator Mode.
Default Value = false - test will not run in Test Orchestrator Mode
true - test will run in Test Orchestrator Mode
clearPackageDatabooleanNoFor Android only
If useTestOrchestrator is true, then clearPackageData makes sure to remove all shared states from the device's CPU and memory after each test. 
Default Value = false - don't clear shared state data
true - clear shared state data
Code Block
languagetext
titleResponse
{
    "status": "SUCCESS",
    "data": {
        "Test Run Id": "3520546",
        "Link to Reporter": "https://CLOUD_SERVER/reporter/#/test-view-view/-1?testView={%22byKey%22:%22test.run.id%22,%22byKeyValue%22:%223520546%22}"
    },
    "code": "OK"
}

Running Sync Espresso/XCUITest

Enables users to run Espresso or XCUITest synchronously, the response received is after the test run.

POST /api/v1/test-run/execute-test-run

Parameters

Name

Type

Mandatory

Description

executionTypeStringYes

Specified if its Espresso or XCUITest

runningType StringYes

coverage / fastFeedback

  1. Coverage - all of the tests will be executed on all of the selected devices.

  2. Fast feedback - all of the tests will be spread across the selected devices.

appFileYesApplication under test
testAppFileYesespresso / XCUI tests.
deviceQueries StringYes

For coverage mode:

List of strings (XPath queries). The test run should run on devices that match provided queries (device per query).

Multiple queries should be passed in the standard way by repeating the parameter multiple times.

For Fast Feedback:

Only one device query must be provided on the list.

The number of devices used is decided by maxDevices and minDevices parameters.

If the maxDevices parameter is not provided then the execution will try to reserve the maximum number of devices according to license restriction.

It is recommended to use maxDevices parameter always

uuidStringNoProvision profile UUID to sign the Application and the test application.
runTagsStringNoMap as JSON - wanted tags to upload to the reporter.
overallTimeoutLongNo

The number of milliseconds.

Timeout for the overall test run. If not provided - default value (14,400,000) - 4 hours - should be used.

creationTimeoutLongNo

The number of milliseconds.

Timeout for test requests in queued status. If not provided - default value (14,400,000) - 4 hours - should be used.

ignoreTestFileFileNo

This file specifies the tests to exclude.

iOS

  • xcscheme file

Android

  • the file containing full class and method name, separated with comma, e.g.
Code Block
com.example.app.SomeTest, testFoo
com.example.app.AnotherTest, testBar
maxDevicesInteger No 

The maximum number of devices to use during the execution. default value - max available devices license.

Note: Only use in case of fastFeedback

minDevicesInteger No

The minimum number of devices to use during the execution.

Default value - 1.

Note: Only use in case of fastFeedback

retry Integer No

An integer from 0 to 5 -

Specifies how many times failed test should be retried

Default Value -  0 (means no retry)

additionalAppIdsListNo

List of application ids that should be installed on the device/emulator before starting the Espresso/XCUI test.

Application id is returned when uploading the application with Rest API.

retryDifferentDevicebooleanNo

A boolean value which specifies whether or not to run a failed test on different devices according to "retry" value.

Default Value -  false (means will not try to run a failed test on different devices).

If "maxDevices" is specified,  then "retry" might be limited to the min between ("maxDevices" - 1) and "retry". 

useUIAutomatorboolean No

For Android only
A boolean value which decides whether or not to disable Experitest's UIAutomator.
Default Value = false - UIAutomator will not be disabled.
True - UiAutomator will be disabled on Test Start and will be enabled after it ends

useTestOrchestratorbooleanNoFor Android only
Boolean value which decides whether or not to run the test in Test Orchestrator Mode.
Default Value = false - test will not run in Test Orchestrator Mode
true - test will run in Test Orchestrator Mode
clearPackageDatabooleanNoFor Android only
If useTestOrchestrator is true, then clearPackageData makes sure to remove all shared states from the device's CPU and memory after each test. 
Default Value = false - don't clear shared state data
true - clear shared state data
Code Block
languagetext
titleResponse
{
  "status": "SUCCESS",
  "data": {
    "Test Run Id": "3520409",
    "Test Run State": "Finished",
    "Total number of tests": "11",
    "Number of passed tests": "3",
    "Number of failed tests": "8",
    "Number of skipped tests": "0",
    "Number of running tests": "0",
    "Number of queued tests": "0",
    "Link to Reporter": "https://CLOUD_SERVER/reporter/#/test-view-view/-1?testView={%22byKey%22:%22test.run.id%22,%22byKeyValue%22:%223520409%22}"
  },
  "code": "OK"
}

...

Java Code Examples

The examples below use the Unirest HTTP using the Unirest HTTP library To compile then use the following dependencies in your Java Project.

...