Legacy | Vitals start

  • Command: vitals

  • Subcommand: start

  • 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, iOS

Description

Starts collecting part or all of the real-time vitals data generated by the device until the Vitals stop command is invoked or the script ends. The collected information helps determine how efficient an application is at using resources as well as measuring the general device performance.

Application vitals

It is also possible to collect application-specific vital measurements from mobile devices. Vitals will be separately collected for all of the selected services.

Available application vitals:

  • For Android: Memory Used, CPU Used, and CPU Kernel. CPU vitals are only supported for Android for 7 and earlier.
  • For iOS (8.0 and up): Memory Used, and CPU Total.

Vitals in automation and interactive

The Vitals start function performs the same operation as the Vitals feature in Interactive.

Important information when working with Automation and Interactive simultaneously:

  • Starting and stopping the vitals collection in Automation will not affect Interactive
  • Stopping the vitals collection in Interactive will stop the vitals collection in Automation
  • Running an Automation script with vitals collection will display the vitals in Interactive
  • Interactive and Automation will produce separate CSV files

A single, multiple or all vitals can be stopped at any point within the script.

Parameters

Name Value Default Description
deviceID*     The device for this command.
vitals

all (All)

outputs.monitors.memory.used (Memory Used)

outputs.monitors.memory.cache (Memory Cache)

outputs.monitors.memory.free (Memory Free)

outputs.monitors.cpu.user (CPU User)

outputs.monitors.cpu.kernel (CPU Kernel)

outputs.monitors.cpu.total (CPU Total)

outputs.monitors.network.mobile.out (Network Out - Data)

outputs.monitors.network.mobile.in (Network In - Data)

outputs.monitors.network.wlan.out (Network Out - WiFi)

outputs.monitors.network.wlan.in (Network In - WiFi)

outputs.monitors.network.total.out (Network Out - Total)

outputs.monitors.network.total.in (Network In - Total)

All

The Vitals to collect.

All

Memory Used - Used memory

Memory Cache - RAM memory that holds frequently used data

Memory Free - Unused memory

CPU User - Percentage usage of the CPU by the application

CPU Kernel - Percentage usage of the CPU by the operating system

CPU Total - Total CPU usage

Bytes Out - data - Bytes sent to the mobile network

Bytes In - data - Bytes received from the mobile network

Bytes Out - wifi - Bytes sent to wireless network

Bytes In - wifi - Bytes received from the wireless network

interval   1 The data collection frequency, in seconds. Recommended between 10 and 30.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-08_09_26_26_940?operation=command&securityToken=<your_token>&command=vitals&subcommand=start&param.deviceId=6370E775&param.vitals=all
Copy

JSON response

{
  "reason": "Success",
  "timer.elapsed": "141",
  "returnValue": "{[DeviceVital: VitalId:outputs.monitors.memory.cache]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.cpu.user]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.cpu.kernel]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.network.wlan.in]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.network.mobile.out]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.network.mobile.in]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.network.wlan.out]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.memory.free]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.cpu.total]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED], [DeviceVital: VitalId:outputs.monitors.memory.used]=[CollectedMonitorStatusInfo: Message:null, Status:SUCCEEDED]}",
  "testGridReportUrl": "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-08_09_26_26_940",
  "description": "Success",
  "timer.system": "141",
  "completed": "true",
  "flowEndCode": "SUCCEEDED",
  "executionId": "john@perfectomobile.com_controller_16-11-08_09_26_26_940",
  "timer.ux": "0",
  "singleTestReportUrl": "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161108/controller_16-11-08_09_26_26_940.xml&ownerId=john@perfectomobile.com&sharingCode=166ca97d-a844-443e-bb78-99da59f69f8f",
  "reportKey": "PRIVATE:controller/161108/controller_16-11-08_09_26_26_940.xml",
  "timer.device": "0"}