jMeter - Environment

Advertisements


JMeter is a framework for Java, so the very first requirement is to have JDK installed in your machine.

System Requirement

JDK1.6 or above.
Memoryno minimum requirement.
Disk Spaceno minimum requirement.
Operating Systemno minimum requirement.

Step 1 - verify Java installation in your machine

Now, open console and execute the following java command.

OSTaskCommand
WindowsOpen Command Consolec:\> java -version
LinuxOpen Command Terminal$ java -version
MacOpen Terminalmachine:~ joseph$ java -version

Let's verify the output for all the operating systems:

OSOutput
Windows java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
Linux java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
Mac java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

If you do not have Java installed, install the Java Software Development Kit (SDK) from http://www.oracle.com/technetwork/java/javase/downloads/index.html. We are assuming Java 1.7.0_25 as installed version for this tutorial.

Step 2: Set JAVA environment

Set the JAVA_HOME environment variable to point to the base directory location, where Java is installed on your machine. For example;

OSOutput
WindowsSet the environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_25
Linuxexport JAVA_HOME=/usr/local/java-current
Macexport JAVA_HOME=/Library/Java/Home

Append Java compiler location to System Path.

OSOutput
WindowsAppend the string; C:\Program Files\Java\jdk1.7.0_25\bin to the end of the system variable, Path.
Linuxexport PATH=$PATH:$JAVA_HOME/bin/
Macnot required

Verify Java Installation using java -version command explained above.

Step 3: Download JMeter

Download latest version of JMeter from http://jmeter.apache.org/download_jmeter.cgi. At the time of writing this tutorial, I downloaded apache-jmeter-2.9 and copied it into C:\>JMeter folder.

The directory structure should look like as below:

  • apache-jmeter-2.9

  • apache-jmeter-2.9\bin

  • apache-jmeter-2.9\docs

  • apache-jmeter-2.9\extras

  • apache-jmeter-2.9\lib\

  • apache-jmeter-2.9\lib\ext

  • apache-jmeter-2.9\lib\junit

  • apache-jmeter-2.9\printable_docs

You can rename the parent directory (i.e. apache-jmeter-2.9) if you want, but do not change any of the sub-directory names.

Step 4: Run JMeter

Once the you download the JMeter, goto to the bin directory. In our case it would be /home/manisha/apache-jmeter-2.9/bin. Now click on the following:

OSOutput
Windowsjmeter.bat
Linuxjmeter.sh
Macjmeter.sh

Once clicked on the above file, after a short pause, the JMeter GUI should appear which is a Swing application as seen in the image below:

JMeter GUI

This is the main page and default page of the tool.



Advertisements
Advertisements