Techknow Study

JMETER Script Execution with ANT-1

1:09:00 AM vikas 0 Comments Category :

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.
  1. From JMeter folder structure
  2. From ANT Folder structure
Here we will cover 1st approach (For 2nd approach just click on LINK).
Software Requirement:-
  1. Java 1.6 and higher version
  2. Apache JMeter Latest version
  3. Apache Ant Latest version
Below are the steps needs to follow to Execute JMeter script and generate HTML Report:-
  1. Download JAVA and install on your machine
  2. Set the environment variable
    Example:- JAVA_HOME= C:\Program Files\Java\jdk1.8.0_112
  3. Download Apache JMeter and UnZip
  4. Download Apache ANT and UnZip
  5. Set the path of ANT “/bin” folder
    Example:- PATH= G:\USER\apache-ant-1.10.1\bin
  6. Through command prompt just open “extra” folder of JMeter
    Example:- cd G:\USER\apache-jmeter-3.2\extras
  7. 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}
  8. You will see a “BUIL SUCCESSFUL” message
    ANT Build Successful Message
  9. 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
ANT HTML Result
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.

RELATED POSTS

0 comments