Tuesday 5 August 2014

Jmeter - HTML Reports using ANT

Prerequisites
1. JMeter
2. Apache Ant [download]
3. Java jdk/jre


Steps
1. Once you extract the Apache Ant to the relevant directory, we need to set the environmental variables for the Ant.


2. Right click on my computer icon , select properties, Click on advance system settings , Click on Environmental variables button , Click on new button of the user variables section, Enter new variable call ANT_HOME and enter the path.






3. Then select the path variable listed in the system variables section and enter the path of Apache ant home.

4. After setting the path variable open the command prompt and run the below command,
C:\ant -version

You should see ant is working now. If its fail try the following command to see the value for ANT_HOME.



 
5. Open the build.xml file located in apache-jmeter-2.9/extras

6. Set jmeterhome = ”C:/apache-jmeter-2.9″

7. Set style="C:/apache-jmeter-2.9/extras/jmeter-results-detail-report${style_version}.xsl"

8. Save the build.xml file

9. Open command prompt and navigate to the apache-jmeter-2.9/extras folder

10. To run the test, we can execute following command.
Syntax: ant –Dtest = <jmx file name>
Example: ant –Dtest = test






It will generate html file which can open via browser.


No comments:

Post a Comment