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

A performance report is available when executing a transaction. The report contains the following measurements from the browser:

  1. Duration - The transaction durations in milliseconds.
  2. Speed Index - Provides a computed overall score of how quickly the final content was painted.




Note

  • The above performance report is an example and can be viewed in SeeTest Reporter.
  • To enable the Speed Index calculation in the report, please contact Experitest Support. 
  • A transaction maximum time is 5 min. After 5 minutes transaction will be canceled
  • The transaction will be canceled if driver.quit() is performed. No data will be saved

Report data:

  1. The upper left-hand side is the transaction name and application data (name and version)
  2. The upper right-hand side is the browser information (name, model, OS, Resolution and Network Profile)
  3. The rectangles on the right show the measurements of the transaction

StartPerformanceTransaction

Start Performance Transaction collects data on the duration of the browser.

The command must be used with the following EndPerformanceTransaction 

driver.executeScript("seetest:client.startPerformanceTransaction(\"Your app version\")");

EndPerformanceTransaction

End Performance Transaction must be performed after StartPerformanceTransaction. It takes the collected data on the duration and speed index of the test on the current browser, and upload it to SeeTest Reporter.

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

Object o = driver.executeScript("seetest:client.endPerformanceTransaction(\"your transaction name\")");
Example
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.MalformedURLException;
import java.net.URL;

public class PerformanceTransaction {
    private RemoteWebDriver driver;

    @Before
    public void setUp() {
        DesiredCapabilities dc = new DesiredCapabilities();
        URL url = null;
        try {
            url = new URL("<Cloud URL>");
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        dc.setCapability("username", "<username>");
        dc.setCapability("password", "<password>");
        driver = new RemoteWebDriver(url, dc);
    }

    @Test
    public void PerformanceTransactionTest() {
        driver.executeScript("seetest:client.startPerformanceTransaction(\"App Version\")");
        driver.get("https://www.netflix.com/il-en/login");
        Object o = driver.executeScript("seetest:client.endPerformanceTransaction(\"TransactionName\")");
        System.out.println(o.toString());
    }

    @After
    public void tearDown() {
        driver.quit();
    }
}

  • No labels