Use Dynatrace to measure the performance


DynaTrace Ajax Edition is a free tool for optimizing web 2.0 applications. It supports Microsoft Internet Explorer as well as Mozilla Firefox. Dynatrace finds problems and provides a complete picture of what is going on in the browser and it automatically recommend optimizations. This recipe will show how dynaTrace can capture the network traffic from the activity generated by your testing tool.


We have to download and install dynaTrace AJAX Edition from, before we can start measuring our websites performance.


  1. We have to set an environment variable to the Selenium process that launches the browser, before we can capture a performance metrics. We can do this in eclipse by opening the context menu on the project and select Run As > Run Configurations…
     Click on the TestNG test class in the left panel, then click on the environment tab in the right panel. In this tab we can add our environment variables that will launch with the TestNG test, by clicking New…
  2. Start the installed dynaTrace AJAX edition application.
  3. Run the Selenium tests.
  4. The results are visible in dynaTrace AJAX edition, after finishing the tests.

You have to start dynaTrace AJAX Edition before running your test. The Browser that you launch via Selenium will not start the AJAX Edition Client but will just try to connect to an existing instance.

What has been done

Selenium starts a browser with the predefined environment variables and will pass all performance related metric through dynaTrace AJAX Edition. Testresults can be analyzed in dynaTrace AJAX Edition after finishing the testscripts.

There is more…

Allow thirdparty add-ons

We might not see any results in dynaTrace AJAX edition due Microsoft Internet Explorer security restrictions. In this case we need to modify the browser settings using the following actions.

  1. Open Microsoft Internet Explorer
  2. Go to the manage add-ons window by clicking Tools > Internet Options and select Programs > Manage add-ons
  3. Enable the dynaTrace AJAX edition Toolbar and Agent, by selecting the add-on and click on Enable

Environments variables

We can set more environment variables to the Selenium process. We can implement the environment variables in the tables below on the same way as described above.

Variable Description
 DT_AE_AGENTACTIVE  True will activates the browser add-on Agent.
 DT_AE_AGENTNAME  Name of the recorded session.
 DT_AE_SERVER  (optional) Allows you to connect to a dynaTrace AJAX Client on a different port (only localhost connections are allowed). Default: localhost:9988
 DT_AE_CLEARCACHE  (optional) Allows you to clear the browser cache before browsing through your sites. Default: false
 DT_AE_STARTURL  (optional) Allows you to specify an initial Start Url. Default: about:blank


We might want to know which environment variables are set for debugging purposes. We can download Microsoft Process Explorer from the following location:
We can check the browser process (iexplorer.exe or firefox.exe) and check which environment variables get passed. In the screenshot below we can see the environment variables that get passed by dynaTrace AJAX Edition Client to the browser when launching a browser from the Client.


One thought on “Use Dynatrace to measure the performance”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.