Legacy | Clean application

  • Command: application

  • Subcommand: clean

  • Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium

    All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.

  • Supported OS: Android

Description

Cleans the data (including cache) from any application installed on the device and brings the application back to its initial state. This saves time and instantly resets the app for the next test.

To use this command, the application identifier is required. For information on retrieving the application identifier, see Application identifier.

Parameters

Name Value Default Description
deviceID*     The device for this command.
name     The application name as it is displayed on the device screen.
identifier     The identifier of the application.
timeout    

The time, in seconds, to wait for the application to start. A zero value will start the application, without any validation or retries, and return immediately.

On Android, a value greater than zero will wait for the defined time and fail if the app is not loaded by that time.

On iOS, the behavior is identical to the default undefined timeout, the command will validate that the application has started on iOS devices only.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_controller_16-11-06_14_43_06_35?operation=command&securityToken=<your_token>&command=application&subcommand=clean&param.deviceId=6370E775&param.file=PUBLIC:Android/android.perfecto.apk&responseFormat=xml
Copy

JSON response

 {
    "reason" : "Success",
    "timer.elapsed" : "2250",
    "returnValue" : "OK",
    "testGridReportUrl" : "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-06_15_24_03_46",
    "description" : "Success",
    "timer.system" : "0",
    "completed" : "true",
    "flowEndCode" : "SUCCEEDED",
    "executionId" : "samb@perfectomobile.com_controller_16-11-06_15_24_03_46",
    "timer.ux" : "2250",
    "singleTestReportUrl" : "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_15_24_03_46.xml&ownerId=samb@perfectomobile.com&sharingCode=a5ddf904-e458-4851-a36e-311cb47a2f22",
    "reportKey" : "PRIVATE:controller/161106/controller_16-11-06_15_24_03_46.xml",
    "timer.device" : "2250"}