Legacy | Run app in background

  • Command: application

  • Subcommand: back

  • 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

Identifies the active application automatically, moves it to the background for the timeout defined, and then returns it to the foreground. You can check how your application behaves when coming back into foreground: Is your data saved? Is your session alive? Did your application crash?

Note:

This command is supported for Android devices running version earlier than 5.0

Parameters

Name Value Default Description
deviceID*     The device for this command.
timeout   20 The time, in seconds, to run the current application as a background application.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_controller_16-11-06_16_30_47_55?operation=command&securityToken=<your_token>&command=application&subcommand=back&param.deviceId=6370E775
Copy

JSON response

{
    "reason":"Success",
    "timer.elapsed":"21454",
    "returnValue":"OK",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-06_16_30_47_55",
    "description":"Success",
    "timer.system":"0",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "executionId":"samb@perfectomobile.com_controller_16-11-06_16_30_47_55",
    "timer.ux":"21454",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_16_30_47_55.xml&ownerId=samb@perfectomobile.com&sharingCode=ddc2b6b4-6fa0-42e7-b2f2-47a9b188641f",
    "reportKey":"PRIVATE:controller/161106/controller_16-11-06_16_30_47_55.xml",
    "timer.device":"21454"}