Sunday, 26 January 2014

Installing Apache JMeter in Windows XP

Prerequisites for installing Apache JMeterHow to install Apache JMeter?How to start Apache JMeter?

Prerequisites for installing Apache JMeter


Apache JMeter is a utility based on Java.  We need Java runtime already installed to use Apache JMeter.  After confirming that our Windows XP system has proper Java runtime installed we can proceed for installing Apache JMeter.

For checking whether we have Java runtime installed we can follow one of the methods given here.  The second method given on that page is the easiest and that is opening a command prompt and typing the command:

java -version

If the command works Java is installed and you will also know the version of Java.

Apache JMeter runs on a fully compliant JVM 1.4 or higher. (It is found that some early versions of Java 1.5 below update 7 do not recognize some JVM switches and hence the jmeter.bat script file needs some changes to run JMeter, described at the end of post).

Steps for installing Apache JMeter

The Apache JMeter Home page contains links for downloads.  When we visit Apache JMeter home page the Apache Jakarta project symbol of a bird feather can be seen with introduction to JMeter. 



As shown in the image below we have to select the Download Releases link from the home page.

The download page presents many options for download.  Usually the suggested mirror is the best mirror but we can choose another one if the suggested mirror gives error or seems slow.  For just using the tool we need only the binary release.  The screen below shows the version current at the time of writing this article.  The TGZ version of the binary is relatively smallest in size.  Click on that link and save the download when prompted by the browser.

Alternatively you can click on the ZIP version given below and use any standard UNZIP utility to extract the files.

I have saved the TGZ file and extracted the contents by using 7Zip utility for windows.  After extracting the TGZ file we get a folder named jakarta-jmeter-n.n.n, where n.n.n is the version number which we downloaded.

The executable script for Apache JMeter is located in the bin directory.

The screen below shows all the contents of the jmeter bin folder.

Starting Apache JMeter tool


The executable script for Windows platform is jmeter.bat for Linux systems it will be jmeter.sh
These scripts are used to start JMeter in GUI mode.  Let us double click the jmeter.bat script to start the tool.

Double clicking the jmeter.bat file will start one command prompt and the JMeter utility in GUI mode, as shown below.  The command prompt is tied with the GUI and hence cannot be closed.  If the command prompt is closed the GUI will terminate.  We can keep the command prompt minimized while working with JMeter GUI.  The command prompt is useful in viewing any JMeter exceptions that may occur.

We saw how to download, install and start the Apache JMeter utility.

NOTE: Although Apache JMeter can run on any fully compliant Java version above Java 1.4 (It is found that some early versions of Java 1.5 below update 7 do not recognize some JVM switches and hence the jmeter.bat script file needs some changes to run JMeter.  If you happen to have early Java 1.5 version below update 7 then you may get error when double clicking the jmeter.bat file.  The error can be fixed by commenting line "set DUMP=-XX:+HeapDumpOnOutOfMemoryError" in the jmeter.bat file.  Open the jmeter.bat file by right clicking and choosing Edit option.  add REM before that line and you are ready to go.

Reference:
1) http://jakarta.apache.org/jmeter/usermanual/get-started.html#install

Thanks for reading.

No comments:

Post a Comment