How to Generate XSLT Report in Selenium Webdriver

Hello Welcome to Selenium tutorial, in this post, we will see how to Generate XSLT Report in Selenium Webdriver.

Any Automation without good reporting is of no use, When you integrate Selenium with TestNG you will get some default reports by TestNG which is very useful but still we can generate good reports via XSLT reporter or ATU reporter.

Before we begin to XSLT post I also want to share one more reporting which I actually use in my current project and trust me you will also love this reporting. I am all time fan of this report and it covers log and screenshot as well.

Reporting tool which I was talking about is Extent Report which is again an open source framework which you can use for any existing or new  project. I have detailed article and video on this so you want to explore more then click below link and start using extent report.

New Reporting- Advance Reporting using Extent report 

I have created small youTube  Video on XSLT Report in Selenium WebDriver

 

XSLT Report in Selenium Webdriver

XSLT stands for XML Style-sheet language for transformation, It provide very rich formatting report using TestNG framework.

To generate XSLT report in Selenium be ready with below  precondition.

Precondition-
1- Ant should be installed.

2- We should have atleast some test case should be executed by TestNG (i.e. -output directory  should be available in home directory).

 

Install ANT-

Install ANT

Install ANT

What is Ant

1-Apache Ant is a Java based build tool from Apache.

2-Apache Ant’s build files are written in XML .

3-Open Source tool.

This post will cover you how to Install Apache ANT to automate the build and deployment process in simple and easy steps.

 

Let us Generate XSLT Report in Selenium WebDriver

Step 1- Navigate to below mention url

http://ant.apache.org/bindownload.cgi

 

Step 2- Navigate to Current release of ant and download the zip file

Download ANT

Generate XSLT report in Selenium

 

Step 3- Extract zip file

Step 4- Once we extract the zip file then we need to set environment variable.

Right click on My computer and select the properties and click on Advanced system setting

 

System setting

System setting

 

 

Add new variable

Add new variable

 

Add the user variable – Here give the name ANT_HOME and in value section specify the path till home directory of ant

Add ANT_HOME

 

Add system variable- In this we need to edit existing system path click on edit , go till last and give the location till bin and save.

Generate XSLT Report

Generate XSLT Report

 

Note- Please do not edit other path– it may crash your system.

 

Step 5- Now verify that Ant is installed properly- Open CMD and type run and hit enter.

 

Ant install

Ant install

 

Note- if it is install properly then in output console we will get build.xml not found-build failed

 

Build failed

Build failed

 

Step 1- Download XSLT from my Google driver account.
Step 2- Unzip XSLT Folder and copy all the files and paste into project home directory.
Refer below screen-shot

 

Download XSLT Folder

Download XSLT Folder

 

 

 

Unzip and add the XSLT Folder

Unzip and add the XSLT Folder

 

Step 3- Now execute build.xml file using Ant – for running build.xml file.

Open command prompt  and go till project home directory and type run and hit enter.

Home directory

Home directory

 

 

Build now

 

Step 4- Once build is successful then write  ant generateReport and hit enter.

Generate XSLT Report

 

Generate XSLT Report

 

Step 5- After  build is successful navigate to project directory and you will get testng-xslt folder

 

Generate XSLT Report

Generate XSLT Report

Inside testng-xslt you will get index.html (this is the main report) open in Firefox or in Chrome browser which support JavaScript

 

Generate XSLT Report

 

Generate XSLT Report

Generate XSLT Report

 

Generate XSLT Report in selenium

Generate XSLT Report

 

If you really think this article will help others too then please share this with others too.

For More updates Learn Automation page

For any query join Selenium group- Selenium Group