Skip to end of metadata
Go to start of metadata

By including the desired capability recordDeviceVitals in your Appium test script, you can collect performance statistics for the real devices used in your tests, including CPU, Network, Memory, and Thread performance. This topic describes how to set up the desired capability in your tests, and collect the statistics when the test completes. 

Setting recordDeviceVitals

Include this setting as part of the desired capabilities in your Appium test script:

capabilities.setCapability("recordDeviceVitals", true);

Collecting Performance Metrics

  1. When your test completes, log into the Real Device Testing web interface, and select the app that you used in the test from your dashboard. 
  2. Click Automated Testing > Appium.
  3. Select the Test Results for your test. 
  4. Under Mobile Vitals, click the link to download the CSV file containing your test performance metrics. 

Performance Metrics for Android Devices

The CSV file will contain these performance metrics for Android devices. 
MetricDescription

unix_epoch_milliseconds

Unix epoch timestamp in milliseconds, which can be matched to events within your automated tests
device_local_time Device’s local date and time
cpu_totalSystem-wide CPU usage in percentage across all CPU cores. 4 cores at max use would be shown as a value of 400 %
cpu_userCPU usage for user processes in percentage across all CPU cores. 4 cores at max use would be shown as a value of 400 %
cpu_kernelAndroid OS CPU usage in percentage across all CPU cores. 4 cores at max use would be shown as a value of 400 %
n_processors Amount of available CPU cores. Use this to divide the cpu values into per core
n_threadsTotal threads in use by the app
memory_size_kb Total memory currently used by device in kilobytes
memory_resident_kbMemory currently in use by application in kilobytes
memory_shared_kbAnonymous shared memory currently in use by system shared between application(s) and system

network_wifi_receive_b

Data in bytes received over wifi connection
network_wifi_sent_bData in bytes sent over wifi connection
network_mobile_receive_bData in bytes received from the mobile carrier network
network_mobile_sent_b Data in bytes sent over mobile carrier network

Performance Metrics for iOS Devices

The CSV file will contain these performance metrics for iOS devices.

MetricDescription

Unix_epoch_milliseconds

Unix epoch timestamp in milliseconds, which can be matched to events within your automated tests
device_local_time Device’s local date and time
cpu_totalSystem-wide CPU usage in percentage. Values between 0 and 100%.
cpu_userUser processes CPU usage in percentage. Values between 0 and 100%.
cpu_processApp under test CPU usage in percentage. Values between 0 and 100%.
n_threadsTotal threads in use by the process
process_memory_used_b Memory used in bytes by the app that is under test
net_bytes_inTotal data in bytes received
net_bytes_outTotal data in bytes sent
net_packets_inTotal packets received
net_packets_outTotal packets sent
disk_write_opsDisk write operations during time period
disk_bytes_writtenBytes written to disk during time period
  • No labels