Page tree
Skip to end of metadata
Go to start of metadata

For energy monitoring, see here.

StartMonitor (PackageName)

Supported in iOS Supported in Android

Description

Erase monitoring information collected so far and start monitoring a given application on regular basis.

Parameters

  • PackageName: Name of application to be monitored or empty string if you just want to erase monitoring information.

Usage

This will erase the monitoring information collected so far, and will start monitoring the given application name.

If no application name will be given, only the monitoring information will be erased.

Scenario: We will create a test on the EriBank demo application. During the test run, we will call the startMonitor command so that this application monitoring vitals will be monitored.

Parameters:

  • PackageName: Will be set to com.experitest.ExperiBank



on iOS devices, application CPU is the sum of all cores usage. While total CPU is normalized with the number of cores.



Energy monitoring (Beta)

Supported in iOS Supported in Android

Parameters

  • PackageName: Application bundle ID followed by ':battery'.

Usage

Run startMonitor("ApplicationID:battery") to start energy monitoring of an installed application. Battery consumption is estimated based on the following components' usage:

  • On iOS :
  1. CPU
  2. location (GPS)
  3. GPU
  4. Networking
  • On Android:
  1. cpu_power_use (for energy consummed by CPU's operations related to the application).
  2. wifi_power_use (for WiFi).
  3. gpu_power_use (for GPU - screen consumption).
  4. rest_power_use (which groups usage by sensors, bluetooth, cellular, etc).
  5. total_usage (the sum of cpu_power_use, wifi_power_use , gpu_power_use, and rest_power_use).
  6. screen_power_use (for power consumed by the screen while the application was running in the foreground).

      The data is presented in unit mAh by default, but it can be also presented in percents (relatively to the full battery capacity). Command setproperty("battery.report.percentage", "true") switches the presentation unit to percents. The command is effective on its test only and has no effect on other tests.

      If a device does not provide details about battery drain caused by a particular component, N/A is reported as its value.


Supported Versions

Supported only for Android versions 5.0+.

Every second a sample containing values for the aforementioned components is taken. The values describe the battery consumption during the time period since the previous sample, i.e., approximately a second. The collected data can be retrieved and exported in CSV format with command getMonitorsData.


Energy monitoring limitations

On iOS devices, Energy monitoring is supported with some limitations:

  • Energy monitoring is only supported on local devices, i.e., not cloud devices.
  • Monitoring must be started after the application was launched.
  • If an application is closed, energy monitoring must be started again by executing startMonitor command.
  • No labels