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 LEGO-like software development using Microservices helped Toobler?

    Microservices: Legos for Software Development  We are so much in love with colorful plastic bricks aka LEGOs! In an age of online games and internet-connected toys, the humble Lego brick has risen against all odds.With approximately 62 pieces of Lego bricks for every man, woman and child  on the face of the earth, mere 6 […]

  • If you are in Jordan looking for app development support you should read this

    From downloading a mobile app  to visiting a brick-and-mortar store, customers today value every interaction with a brand. A great customer experience leaves a lasting impression in their minds about the happy and satisfying experience.  Winning the customer experience race Every  interaction offers  a make-or-break opportunity for a brand to either  build a loyal customer […]

  • Enhanced Efficiency & Optimized Cost of Project Development with Sweden Hybrid Model.

    Going beyond the cost factor and striving to deliver quality, innovation and flexibility to its customers across the globe, Toobler introduced a Hybrid (Onshore and Offshore) Software Development Model. Huge popularity of the hybrid model is fuelled by scores of organizations choosing to keep design and architecture phases at geographic proximity.  Driven by a customer-centric […]

Leave a Reply

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