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

Description

End Performance Transaction must be performed after StartPerformanceTransaction. It takes the collected data on Duration CPU, Battery and Memory of the current device, and upload it to SeeTest Reporter.

The collected data can be viewed under the transaction tab in SeeTest Reporter.

Parameters

NameValue
Name

Name of the transaction to save

Usage

This will end a performance transaction. An exception is thrown if trying to end a transaction without starting.

You can view the transaction, once ended, in SeeTest Reporter under "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 client/quit driver. No data will be saved


Set Experitest Url and Access Key

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

Example

EndPerformanceTransaction
String accessKey = "<accessKey>"
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.startPerformanceTransaction("4G-average");

//...do some work. For example:
seetest.sleep(5000);

// end performance transaction
seetest.endPerformanceTransaction("exampleTransaction");




  • No labels