Comments have been closed on this page. Please use AppMon & UEM Open Q & A forum for questions about this plugin.



Ant Task Library for dynaTrace 3.1 Reporting



dynaTrace Versions

3.1, 3.2


dynaTrace software


dynaTrace BSD



Download for dynaTrace 3.1

Ant Task for dynaTrace 3.1 Reporting


The Download package includes the com.dynatrace.integration.ant.jar library that implements a Dynatrace reporting task to be used by Ant scripts to automatically create reports based on data captured by Dynatrace. The package also includes the source code of the implementation.
The package also includes a sample JUnit test, a system profile, the required dashboards for the reporting task and an ant build.xml file that runs the JUnit test and that produces HTML reports for every unit test method with data from Dynatrace


  1. Save the attached file
  2. Unzip the file
  3. Copy the com.dynatrace.integration.ant.jar to the <dthome>/tools/lib directory
  4. Import the System Profile
  5. Copy the two dashboard files to your <dthom>/server/conf/dashboard directory on the Dynatrace Server and restart the server or open the dashboard files with Dynatrace Client and save them on Dynatrace Server
  6. View the extracted sample build.xml file. It shows you how to use the Dynatrace Reporting task based on the sample in the src directory


You have to define the dtant task in your build scripts like this:

The following options can now be used in your Ant scripts:

	 <dynaTraceReport user="admin" password="admin" hostName="localhost" portNumber="8020" dashboard="Test" iteratorDashboard="Iterator" source="live:Integratin Build" comparison="" reportDir="./report" xmlToFile="./iterator.xml" createHtml="true" />

	 userName           specifies the username to log in with
	 passWord           specifies the password to log in with
         hostName           host name of the dynaTrace Server (default: localhost)
         portNumber         port of the dynaTrace Server Web Service (default: 8020)
         source             defines the datasource for the Iterator and Data dashboard
         comparison         defines a comparison datasource for the Data dashboard
         iteratorDashboard  (optional) specifies a dashboard that needs to have a business transaction or web request dashlet. Each entry in this dashboard is used as a filter for the data dashboard defined in the dashboard parameter
         xmlToFile          if no iterator dashboard is defined the data dashboard is executed without any filter using this filename for the xml raw data that is retrived from the {dtserver}
         dashboard          specifies the data dashboard that is executed with the filter set to every resulting row in the first dashlet of the iterator dashboard, e.g.: every web request in a web request dashlet. If no iterator dashboard is defined the dashboard will be executed without any filter Every dashlet on that dashboard that has a table view will be rendered out to the created report file (Xml and Html)
         reportDir          defines the output directory of the generated reports
         createHtml         if true - Html reports will be generated


Extract the attached zip file. Import the Iterator and Test dashboard as well as the Integration Build System Profile to your Dynatrace Server. Edit the build.xml file and adjust the properties for the Dynatrace and JUnit home directories. Then launch the build.xml file with Ant.
Here is what happens when executing the script

  • The sample JUnit Test will be build
  • The JUnit test will be executed with an injected Dynatrace Agent
  • The Integration Build System Profile defines Sensor Rules to get a purepath for every JUnit test method
  • After the unit test the Dynatrace report task is executed to generate an html report for every executed junit method. The Iterator Dashboard contains a business transaction that lists all test methods. For every of these test methods the Test Dashboard is used to query information like method execution times and API breakdowns

Here is a sample screenshot of the report:

The generated reports are also part of the attached zip file. Open the index.html file in the report folder


Remember that this plugin can also be called with a comparison datasource.
The comparison property is optional. But if specified the Data Dashboard will be opened in comparison mode with the specified compare datasource. The generated reports will show the difference data between the source and comparison source.

Data Source

The source as well as the comparison property define the session to be used with the Iteration and Data Dashboard. The format of this value is as described in the Server-Side XML Reporting.
Here are some examples:

  • No labels