Google's Search, Development and Enterprise Discussions

Google on Ulitzer

Subscribe to Google on Ulitzer: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Google on Ulitzer: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Google Authors: Kevin Jackson, APM Blog, Ben Bradley, Progress Blog, OnPage Blog

Related Topics: iTKO LISA Journal, Ubuntu Linux Journal, SOA Best Practices Digest, Java Developer Magazine, SOA in the Cloud Expo, Open Source Journal, Google, SharePoint Archiving Journal, Microsoft Developer

Blog Feed Post

Open Source Selenium Web Application Testing System

Selenium/BrowserMob Integration with dynaTrace

Selenium is a free Web Application Testing System. It gained lots of popularity since it is available. It’s integration to FireFox – which allows instant record/replay as well as the scripting option - makes it a great tool for functional web testing.

BrowserMob on the other side leverages Selenium by providing an automated load-testing environment for Selenium scripts all configurable online via a Web Dashboard.

Tagging Web Requests
In my recent blog post – Get more out of functional web testing: How to correlate test reports with server side log information? – I discussed the problem that testing results are usually not linked to the log and diagnostics information captured by the application under test. The blog entry offered a way to link the two sides using HTTP Tagging via an HTTP Proxy. Tagging individual Web Requests allows linking each individual request executed by the testing tool with the transactions that are executed on the server side. Your logging framework or diagnostics solution can then take this tag and link the transaction to the originating web request.

Tagging Web Requests with Selenium
Selenium offers a feature to add additional HTTP Tags to each Web Request via DefaultSelenium.addCustomRequestHeader. This feature allows achieving the exact same result as I explained in my previous blog entry.
In order to make it easy for Selenium script developers to use this feature we (Patrick Lightbody from BrowserMob and I) came up with the following 2 requirements:

  1. every test case should automatically be tagged with the test case name. This ensures that we can link each transaction to the test case
  2. the scripter must have the option to change the tagged value within a test case to allow more granular linking to individual actions in a test case

The implementation for these requirements resulted in

  1. a custom TestRunner class (DynaTraceSeleniumRunner) that sets the default value for the HTTP Header to the current test case name
  2. a custom Selenium class (DynaTraceSelenium) that offers the scripter to change the value for the HTTP Header

More Stories By Andreas Grabner

Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi