Measuring Performance with DynaTrace

12 April, 2014
The dynaTrace AJAX Edition is a widely used tool for building optimized web applications. DynaTrace helps in analyzing problems in JavaScript, network requests, page load performance. dynaTrace provides support for Internet Explorer and Firefox web browsers.

When you monitor an application with dynaTrace, it analyzes the application and finds problems while providing detail metrics about the application's performance on various levels. It also provides optimization recommendations automatically. dynaTrace provides support for various testing tools including the Selenium WebDriver, where we can combine dynaTrace with tests.

In this example, we will set up dynaTrace to capture the various performance metrics using a Selenium WebDriver test.

Download BrowserMob proxy
Download and install dynaTrace AJAX Edition from here.

During installation, the dynaTrace AJAX Edition will automatically install Agents (add-on) in Internet Explorer and Firefox. After completing the installation, please make sure that these Agents (add-on) are enabled in the browser.

For using dynaTrace with the Selenium WebDriver, we have to set up some environment variables. These variables will enable dynaTrace to monitor the browser instance launched from the Selenium WebDriver test and capture the performance metrics.

You can set these variables either in the command line or in Eclipse. If you are setting the variables from command line, you can either create a batch file or enter the following command before starting the test run:


For configuring the environment variables in Eclipse and running the test with dynaTrace,
perform the following steps:

1. Start the dynaTrace AJAX Edition (You need to launch the dynaTrace AJAX Edition before running your test).
2. Select the project from Project Explorer in Eclipse.
3. Right-click on the selected project and select Run As | Run Configurations... from the context menu.
4. Select the test that you want to run along with dynaTrace from the right-hand side pane in the Run Configurations dialog box.
5. Select the Environment tab on the Run Configurations dialog box.
6. On the Environment tab, click on the New... button to add a new environment variable.
7. Enter the values in the Name and Value fields for a new environment variable on the New Environment Variable dialog box and click on the OK button, as shown in the following screenshot:

Add the following environment variables:

8. Click on the Run button in Eclipse to start the test run. After completing the test,dynaTrace will display results.

When the Selenium WebDriver test launches a browser with predefined environment variables, the dynaTrace Agents installed as add-ons in the browser get activated, monitor the browser for various events, and collect the performance metrics. This data is passed to the dynaTrace AJAX Edition for further analysis and reporting.

You can view the results in the dynaTrace AJAX Edition window under the Sessions option. dynaTrace will show the performance data and recommendations, which can help you to optimize the application.

No comments:

Post a Comment