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

  • Things to Consider Before Hiring the Right Developer

    As the tech talent war continues to rage, it is no wonder that hiring the right developer takes forever. Managers face numerous difficulties not just hiring but retaining the right talent.If we are to go by statistics, the average time-to-hire for tech positions in the USA is 35 days. A realistic expectation is crucial while […]

  • 4 Ways To Reduce your App Development Costs by 50%

    Being multi-channel has become synonyms with the modern digital environment.Brand presence in these channels is critical to reach potential customers making it a vital business challenge of  the digital era.  Mobile apps have become an integral part of modern business. They are an extension of your brand. Considered as the most powerful business tool, apps […]

  • Tips to build a productive startup culture in your development company

    The word Startup paints a picture of tech-savvy professionals driving casual dress codes and sipping coffee from biodegradable cups in a space with enviable interior design, ping pong tables and bean bags. Ouch, the stereotype hurts! There is more to startups than bean bags and beer taps, it is the startup culture that fuels innovation […]

Leave a Reply

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