Performance Evaluation using JMETER-ANT

We all know that the word  “Automation ” means, there should not be any human intervention for the task.While entering towards the Performance Analysis the most challenging part of the performance testing process is the analysis of test results and the identification of bottlenecks.  Similarly w.r.t Jmeter we can achieve this by integrating with the ant build process.

While I approach JMETER  for the Performance Evaluation ,Usually I go with the  LISTENER    “RESULT TREE ” ,for identifying the Breakpoint/Error Result .For an accurate report,in terms of Analysis , I understood a more elaborate way will be a bit easy.


After a long header,For identifying the break point of site ,I found out  ANT  is an easy OPEN SOURCE WAY ..Ant is a Java-based build tool created as part of the Apache open-source project.They   have a structure and are written in XMl

 Performance  in terms of   “Maximum user affordability


Prerequisites :

1)Install java 1.6 version (check the existence of jre and jdk folders with the version 1.6 properly )

Set the environment variable ( Start >> Control panel >>System >> Advance system settings >>Environment variable >> Set PATH  )

2)Install ANT  inside any drive .

a. Download ANT

b. Unzip it and rename to ant.
c. Set environmental variable JAVA_HOME to your JAVA ENVIRONMENT.
Set the environmental variable (Start >> Control panel >>System>>Advance system settings >>Environment variable >> Set PATH )
Give the Variable Name:ANT_HOME
Give the Value: E:\ant
Click OK
Then,we’ll add new ANT_HOME path,
And Click again on New Button if you do not have ‘path’ Variable in there, if so select it and edit as
Give the Variable Name:path
Give the Value D:\Program Files\Java\jdk1.6.0_03\bin;%ANT_HOME%\bin
Click OK
d. Check whether ANT works correctly or not using the following command in command prompt.

ant -version

3)Install Jmeter 2.6 (versions if any,try to install the versions less than 2.7 ).

            Add “ant-Jmeter  1.11” jar file inside the jmeter ( Jmeter>> extras folder ).

Steps to proceed :

1)Run the script in bad boy for recording the script.

2) Export to Jmeter as jmx file in Extras folder

3)Execute Jmeter bat/windows file ,Launch  jmeter through  command prompt,and save result .

4)Open the  xml file inside  Jmeter>> Extras folder .

 Open it and edit the following  lines

                 a) Jmeter home (1) : Here specify the Jmeter saved location

                 b) Test plan (2): The name of the exported Jmeter file ( .jmx file )

                c) Result log (3): The file to which the  results should get logged ( system  will create its own (same name of the   jmx file ,save in (.jtl file ))


        d)In (4): The name of the file  (same file of result log(c) )

        e)Out (5)  : The html file to which the result is logged,where we can Analyse /Review result .

check the screen shot  for the reference points (1,2,3,4,5).

jmeter 1

5)Save the xml file

6) Open the command prompt and go to the Jmeter /bin location .

   Run the jmeter -n -t ..\extras\name.jmx -l name.jtl.

Defines   the number of threads (n) and time segments (t)  .. mentions the location of the file  from  which its running .

the (l) mentions the result log file to which it   gets logged.

7)Now Navigate  to the ant-jmeter location through command prompt ,for the xml file running

 as :C:\Program Files\apache\apache-jmeter-2.11\extras>ant

Run the file  ,build the tree ,result are logged to jtl as well as html ,and shows the message as ” build successful. “

jmeter 4

Goto the extras folder and check the html file created with the same name of the jmx file .

Open it and check the results ..

jmeter 2

For overwrite the sample run report ,

Goto the xml file ,edit the following line above Jmeter definition .

delete file =”${testpath}/ ${name of  the file to get overwrite}.html “.

jmeter 3

Thus the performance report  is in your hand now ..


Latest stories

  • How to build a scalable web application using Microservices Architecture

    Millions of people worldwide stream more than two billion hours worth of video from Netflix each month. Another example is Facebook, which roughly had 2.85 billion active users in the first quarter of 2021. Talking about the e-commerce giant, Amazon receives more than 66 thousand orders per hour, and 18.5 orders per second. Whoooo! So, […]

  • Flutter vs React Native: What to choose in 2021

    If Flutter vs React Native is your burgeoning question for this year 2021, guess what you are not alone. We no longer need statistics to know about the ever-growing popularity of mobile apps across the world. According to the latest report, global consumers are now spending an average of 4.2 hours per day using apps […]

  • React Native App development: Top Reasons to Choose It in 2021

    The promising cross-platform app development framework aka React Native has garnered huge popularity in recent times. The technology enables simultaneous mobile app development for multiple platforms using a single and a fraction of resources required for native development. The react native framework has emerged to be a popular choice among businesses to fulfill their cross-platform […]

Leave a Reply

Your email address will not be published. Required fields are marked *