JMETER Script Execution with ANT-1
JMeter Script Execution with ANT from JMeter folder structure
JMETER and ANT both are open source. We can execute the JMeter scripts with the help of ANT which will generate a HTML report. We can send/show the HTML report after execution for verification/confirmation.There are two ways to execute the JMeter script ie.
Here we will cover 1st approach (For 2nd approach just click on LINK).
Software Requirement:-- Java 1.6 and higher version
- Apache JMeter Latest version
- Apache Ant Latest version
Below are the steps needs to follow to Execute JMeter script and generate HTML Report:-
- Download JAVA and install on your machine
- Set the environment variable
Example:- JAVA_HOME= C:\Program Files\Java\jdk1.8.0_112 - Download Apache JMeter and UnZip
- Download Apache ANT and UnZip
- Set the path of ANT “/bin” folder
Example:- PATH= G:\USER\apache-ant-1.10.1\bin - Through command prompt just open “extra” folder of JMeter
Example:- cd G:\USER\apache-jmeter-3.2\extras - Type ant and hit enter{before hitting ant command make sure Test.jmx file should present inside the "\extra" folder of Apache JMeter, which we are going to execute now}
- You will see a “BUIL SUCCESSFUL” message
- It will generate two files inside the "\extra" folder of Apache JMeter:-
- Test.jtl- File having result in XML format
- Test.html- File having result in HTML format
Note: - While following above process may be anyone will face some errors. I am posting the solution for these errors in my Next Post. These same errors I encountered while running the JMeter scripts from ANT.
0 comments