Web Application Monitoring

Web Transaction Device Driver provides great opportunities in web application monitoring. Testing and monitoring web applications performance is carried out by executing scripts. An ability to control a browser and create test scripts is provided by Selenium.

Selenium is a portable software testing framework for web applications.

Web application monitoring tool is implemented as a Device driver, so to get started you need to create a Web Transaction Device. In the process of adding a Device you need to specify a script that will be executed at each synchronization.

Launch of the test script requires a browser environment compatible with the deployed Iotellect Server installation and the Selenium components used in that installation.

Script Creation

Test scripts can be prepared with the help of Selenium IDE or manually.

Selenium IDE may be used as a recording tool for user actions in the browser. The exact Selenium IDE user interface and available export options may differ depending on the installed version. For this reason, recorded actions should be treated as an auxiliary source and then adapted to the Java class format required by Iotellect Server.

The current Selenium IDE documentation can be found on the website http://www.seleniumhq.org/docs/.

Use the following code template to prepare a script compatible with Iotellect Server.

import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.openqa.selenium.By;
import com.tibbo.linkserver.plugin.device.web.transaction.Screenshot;
public class WebTransactionClass {
 private String baseUrl = "${baseURL}";
 public void test(EventFiringWebDriver driver, Screenshot screenshot) throws Exception {
// recorded actions
}
}

After recording the required actions, prepare the final script using this template and save it to the Script property of the Device settings.

An example of a test script:

import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.openqa.selenium.By;
import com.tibbo.linkserver.plugin.device.web.transaction.Screenshot;
public class WebTransactionClass {
 private String baseUrl = "http://example.com/";
 public void test (EventFiringWebDriver driver, Screenshot screenshot) throws Exception {
   driver.get(baseUrl + "/");
   driver.findElement(By.linkText("Technology")).click();
   screenshot.takeScreenshot(driver);
   driver.findElement(By.linkText("Industries")).click();
   driver.findElement(By.linkText("Solutions")).click();
 }
}

Script execution results are stored to Actions and Screenshots Device settings at each synchronization.

Web transaction driver provides easy way of screenshots taking. You can insert the following line to the script to take a screenshot: screenshot.takeScreenshot(driver);

Was this page helpful?