Legacy | Inject motion

  • Command: motion

  • Subcommand: inject

  • Supported Platforms: Native (legacy), UFT (legacy), 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

Command injects a DetectedActivity object, that identifies an activity of the device has been detected with a "level of confidence" that the user is performing this activity . The command should be activated by the automation script periodically to simulate an activity by the user.

The application must have been sensor instrumented at time of installation on device.

One of the two application identifiers (name or identifier) is required.

Important:

This command is supported for Early Access customers. Contact Perfecto Support if you wish to join the Early Access progam.

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.
vehicle    

Indicates the likelyhood that device is currently in a moving vehicle.

Value is in range [0,100]

bicycle    

Indicates the likelyhood that device is currently moving on a bicycle.

Value is in range [0,100]

foot    

Indicates the likelihood that device is currently moving in possession of person who is running or walking.

Value is in range [0,100]

walking    

Indicates the likelihood that device is currently in possession of person who is walking.

Value is in range [0,100]

running    

Indicates the likelihood that device is currently in possession of person who is running.

Value is in range [0,100]

still    

Indicates the likelihood that device is currently standing in current position.

Value is in range [0,100]

tilting    

Indicates the likelihood that device's angle relative to its center of gravity has changed. Usually indicates that the device is picked up from a desk or a user who is sitting stands up.

Value is in range [0,100]

unknown    

Indicates the likelihood that device is moving due to an unidentified activity.

Value is in range [0,100]

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_17-12-21_09_57_33_640?operation=command&user=john@perfectomobile.com&password=jsecurityToken=<your_token>test123&command=motion&subcommand=inject&param.deviceId=6BA14A93C1DE5748D3E65C555CCE67FCC9EBD4CA&param.name=myApp&param.bicycle=10&param.unknown=56
Copy

JSON format

{
    "executionId":"john@perfectomobile.com_controller_17-12-21_09_57_33_640",
    "reason":"Success",
    "timer.elapsed":"5742",
    "testGridReportUrl":"https://mycloud.reporting-01.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_17-12-21_09_57_33_640",
    "timer.ux":"5733",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/171221/controller_17-12-21_09_57_33_640.xml&ownerId=john@perfectomobile.com&sharingCode=4b5a4717-6e56-45e2-868e-8ee64285468b",
    "description":"Success",
    "timer.system":"9",
    "reportKey":"PRIVATE:controller/161110/controller_17-12-21_09_57_33.xml",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "timer.device":"5733"}