GetCounter
Description
Returns the monitor (CPU/Memory/Battery) value on the given time
Parameters
Name | Value | Description |
---|---|---|
CounterName | String | * CPU * Memory * Battery(only when a Instrumented application is running in the foreground) |
PackageName | String | Optional parameter. When given, monitor value will be returned for the application whose package name is given, otherwise the monitor value will be returned for the system level. |
Usage
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Example
GetCounter
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");
...
...
// Start Monitor and erases and previous monitor data and store current monitor in a given file.
seetest.startMonitor("com.experitest.ExperiBank");
seetest.setMonitorPollingInterval(1000);
seetest.sleep(5000);
// get Count for cpu
client.GetCounter("cpu");
Values will be retuned in the report