Sunday, January 25, 2015

Introduction To Different Options of Jmeter

Here we try to learn some basic options of JMeter .We are working on JMeter UI so all options are related to JMeter UI.

After launching JMeter, we found it is opened with a  new test. It looks like  below
  There are 2 options:
  1.  Test Plan  
  2. Workbench
1. Test Plan:Test Plan is a place where we can add Threads (User),Config Element, Timer, Listner,Assertion etc and we can save and store into a file.

2. WorkBench: WorkBench is a place where we can prepare and test our script.WorkBench have all elemets those are available in Test Plan.But there is one more option that is Non-Test Element where we can find recording option.One thing should keep in mind that we cannot save workbench with Test Plan on old version of JMeter, but in 2.12 there is one option(Check Box) that is Save WorkBench.We check this  to save the WorkBench alongwith Test Plan.
 We can find all available option after right click on Test Plan or WorkBench

Now we will try to understand the different available option in JMeter.

 Threads(Users): It is simulate the available user(virtual).


 Test Fragment: It is used to group the test step or module.

 Config Element: It is required to configure any request.
 Timer: It is use to add some wait to create the real scenario in the test
Pre Processors: It is required to manipulate the different type of request before send it to the server.

Post Processors: It is required to manipulate the response, mainly required to feed some data to the next request.
Assertions: It is required to verify the response according to the assertion criteria.
 Listener: It is the required to visualize the test result after run the test.
Sampler: We will find this under Thread Group option.It contains all type of request.
  Logic Controller: It is required to set the workflow of our test script.

Wednesday, December 31, 2014

JMeter SetUp

JMeter is a Performance measuring tool for web application. We can create different number of virtual user(Thread) to access the web application and track the performance result of the response on different number of user and after analysis the report we can determine the loop holes, problem, limitation or threshold value of the application .

We can go deep later,In this post we only try to setup JMeter.

Step 1:Install Java

JMeter  basically a Java application so we need to install Java.we can only install JRE(Java Runtime Environment) but to use the full feature of JMeter we need to install JDK(Java development Kit).
We can download it from here  .

JDK comes with JRE so we donot need to download or install JRE separately.

Step 2:Download JMeter

Download JMeter form here .

Step 3:Install JMeter

 After completion of download we extract it.After extraction it looks like below

There is no installation file to install JMeter.So we donot need to install anything.

Step 4:Run JMeter

There is multiple option to run JMeter.

1. Go to bin folder and double click on jmeter.bat(for Windows system)
2. Go to bin folder and double click on ApacheJMeter.jar
3. Open command window and go to the apache bin folder and type the below command with appropriate parameter .
e.g :- 
jmeter -n -t testPlan.jmx - l log.jtl 
                                   or
java -jar  ApacheJMeter.jar  -n -t testPlan.jmx - l log.jtl

Give complete path of ApacheJMeter.jar path if environment variable is not set.

We can get the details list of option for JMeter in cmd mode After typing jmeter -h in cmd

 or  type this command
java -jar ApacheJMeter.jar -h in command window