ANT - Generate XSLT Reports In Selenium WebDriver Data Driven Framework - Part 1

To generate XSLT reports, We have to use Apache Ant. Apache Ant Is open source command-line tool which will help us to generate XSLT reports for our selenium webdriver data driven software automation testing framework. In STEP 18, We have successfully Implemented Logging functionality In our data driven framework for software web application. Now let us configure our data driven framework project to generate XSLT Interactive reports.

Prerequisite : All previous 18 steps of creating selenium webdriver data driven framework should be followed. You will find links of previous 18 steps on THIS PAGE.

In this step, We will configure our project and system to generate XSLT reports. Configuration Includes Java software Installation, ANT software Installation, adding build.xml file In project and also verify that all other required files are configured and placed at proper place or not.

Why need XSLT reports
Till now, We have generated testng reports as described In STEP 10. But testng reports are not so much Interactive and we can not send this kind of reports to our manager or client. XSLT reports are very Interactive and easy to understand them.

ANT Installation For XSLT reports
First of all you have to configure ant In your system to generate XSLT reports. And to configure ant, Latest java version should be Installed In your system. GO TO THIS PAGE to know how to Install Java software and configure Apache ANT In your system with detailed description steps. I have also described how to verify that ant Is configured properly or not on that page.

Add build.xml File Under Your Project
After Installation of ANT In your system, You have to create build.xml file under your "WDDF" project because ant understand only build.xml file's execution pattern. You can download ready made build.xml file from bellow given link page to Include It In your project.
After downloading build.xml file, Copy-Paste It under your project's folder In eclipse as shown In bellow given Image.

Verify Paths In build.xml File
Open the build.xml file.

  • Verify the Value for "project.jars" property at line no 10 of build.xml file. It should be the path of "JarFiles" folder of "WDDF" project. For me It Is "E:\backup\Training\WDDF\JarFiles".
  • Verify the path of testng-results.xsl file at line no 91 of build.xml file. It should be  "src/com/stta/xslt/testng-results.xsl" If your framework's directory structure Is same to me.
Note : Don't change any thing else In build.xml file.

Confirm Required Jar Files Added In Project's Build Path
Once more need to confirm that bellow given jar files are Included In your project's build path or not. You need bellow given files In your project's build path to generate XSLT reports.
  1. saxon-8.7.jar
  2. SaxonLiaison.jar
  3. testng-xslt-maven-plugin-test-0.0.jar
You can view STEP 3 to know from where to download all above 3 files and STEP 4 to know how to add them In your project's build path.

Confirm "testng-results.xsl" Is Added In Your Project
As described on STEP 3, "testng-results.xsl" file should be added under "com.stta.xslt" package of "WDDF" project.

Now project and system configuration part Is completed to generate XSLT reports for our webdriver data driven framework for any software application. We will learn about how to generate XSLT reports In next step.


  1. Hi,
    I have modified xslt to contain screen shots in report too

  2. You can share with us. please post link here so others can use It.

  3. I successfully installed ANT,but getting many issues ant run, ant clear.can you please help me .