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


Description

Start Performance Transaction collects data on Duration, CPU, Battery, Memory of the specified application on the device. The Network traffic will be measured for the device, and not per application.

The command must be used with the following EndPerformanceTransaction 

Parameters

NameValue
applicationNameApplication to be monitored (bundle id for iOS and package name for Android)
NVProfile

Name of the Virtualization profile (Network Virtualization).

Note: If the empty value is passed, then the '3G-average' profile is selected and if 'NONE' value is passed, no profile will be selected.


This will start a performance transaction. An exception is thrown if trying to start a transaction while an existing transaction is already run.

You can view the transaction, once ended, in SeeTest Reporter under the "Transactions" tab.

Note:

  • Supported version Android 5.0+ and all iOS versions.
  • A transaction maximum time is 5 min. After 5 minutes transaction will be canceled.
  • The transaction will be canceled if you release the client/quit driver. No data will be saved.
  • Make sure the NV server is configured correctly and connected to Host Machine. The device should be connected to the NV network. Advise Network Visualization documentations 


Set Experitest Url and Access Key

Please make sure you replace <EXPERITEST_URL>, <ACCESS_KEY> with the appropriate URL, and access key in the sample code below.

Example

StartPerformanceTransaction
String accessKey = "<ACCESS_KEY>"
String url = "<EXPERITEST_URL>";
DesiredCapabilities dc = new DesiredCapabilities();
//...your capabilities
dc.setCapability("testName", "Transaction example Demo");
dc.setCapability("accessKey", accessKey);
dc.setCapability("deviceQuery", "@os='android' and @category='TABLET'");
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank/.LoginActivity");
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.experitest.ExperiBank");
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, ".LoginActivity");

driver = new AndroidDriver(new URL(url), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");
     
...
...
 
// Starts performance transaction
seetest.startPerformanceTransactionForApplication("com.experitest.ExperiBank", "4G-average");

//do some work. For example - Login transaction:
driver.findElement(By.xpath("//*[@id='loginButton']")).click();

// end performance transaction, returns a performance data in JSON format.
String loginPerfData = seetest.endPerformanceTransaction("Login");




  • No labels