Saturday, July 7, 2012

How to create test plan in Jmeter ?

1. Download the binary

You can get the binary here.

2. Unzip the tarball/zip file

I extracted it file to 
3. Start up JMeter- It seem like to (Double click on Jmeter.bat files)

 Create a Test Plan:

4. Create a Thread Group:

Thread Group:
Thread Group is the beginning point of any Test Plan. Thread Group is set of request that simulate the user actions and all the elements of Test Plan should be under Thread Group. It works like LoadRunner Scenario. In Thread Group we define the Number of User, Ramp Up, and Loop Count.
  • Number of Thread (User), as a name we define the number of users, who will simulate the performance test steps.
  • Ramp-Up option used to set the time that waited between each and every user run. Suppose if you have define 5 then each and every user will activate after 5 seconds. All the time will be in seconds.
  • Loop Count is the option where we set that how many times users will repeat the actions.

5. Add a Sampler: With the help of sampler JMeter send the request to web server.
A sampler is a type of request you want to make. In this example, I used an HTTP request to test load to a web server. It’s good to note JMeter supports multiple types of samplers including web services, JMS, and JDBC. Add a sampler by selecting the Thread Group you just created, right-click, select Add -> Sampler -> HTTP Request.
Configurable properties include:
  • Server Name – what the ip or url is to the server the request it to
  • Port – the port the server is listening to
  • Protocol – the protocol (http, https, etc)
  • Method – HTTP method (POST,GET, PUT, DELETE, etc)
  • Path – the URL path to request
6. Add a Listener:
 Listener is same as Result window of any tools. It will help to analyze the test result. JMeter provides different kind of Listener which we used according to our needs.
See JMeter is having lots of element of Test Plan but these are enough to create sample script for Web Application. For the more details about Test Plan element refer this link.

7. Run the test!