Showing posts with label test plan. Show all posts
Showing posts with label test plan. Show all posts

Tuesday, November 29, 2011

Building a Test Plan

Now in this post we will learn how to build a test plan in JMeter, in brief.
This will be just a basic way to build a simple test plan.


Ø      Adding Elements : Right-Click on an element in the tree and choose new element from ‘Add’ list. We can also load elements from a file and add by choosing ‘merge’ or ‘open’ option.

Ø      Removing Elements : Right-Click on the element to be removed and select ‘remove’ option.

Ø      Loading Elements : To load an element from file, right click on the existing tree element to which you want to add the loaded element, and select the "merge" option. Choose the file where your elements are saved &click on ‘Open’ button. JMeter will merge the elements into the tree.

Ø      Saving Elements : Right-Click on the tree elements that you want to save and choose ‘Save Selection As ...’. JMeter will save the element selected, plus all child elements beneath it.

Ø      Configuring Elements : Any element in the test tree will present controls in JMeter's right-hand frame. These controls allow you to configure the behavior of that particular test element.

Ø      Saving the Test Plan : To save the Test Plan, select ‘Save’ or ‘Save Test Plan As ...’ from the File menu.

Ø      Running a Test Plan : To run your test plan, choose ‘Start’ from the ‘Run’ menu item. When JMeter is running, it shows a small green box at the right hand end of the section just under the menu bar. The numbers to the left of the green box are the number of active threads / total number of threads.

 This is the way we basically built a simple test plan in JMeter.
Now work it out on JMeter to know it better.

Monday, November 28, 2011

Elements of JMeter

Now we will learn what are the Elements of JMeter and why they are there in JMeter.


Elements of JMeter:


v     Test Plan
v     Thread Group
v     Controllers & Samplers
v     Listeners
v     Timers
v     Assertions
v     Configuration tool
v     Pre-processor elements
v     Post-processor elements

v     Test Plan describes a series of steps JMeter will execute when run.

v     Thread Group elements are beginning points of any Test Plan. Everything must be under Thread Group.

v     Types of Controllers:-
Ø      Samplers
Ø      Logical Controllers

Ø      Samplers tell JMeter to send a request to a server and wait for response.
                                            e.g. HTTP Request sampler.

Ø      Logical Controllers let you customize the logic that JMeter uses to decide when to send requests.

v     Listeners provide access to the information JMeter gathers about the Test cases while JMeter runs.

Ø      Graph Result Listener plots the response time on graph.
Ø      View Result Tree shows details of sampler request and response.

v     Timers are useful to specify a delay between requests send (to thread group).

v     Assertions allow you to assert facts about responses received from the server being tested. Using Assertion, you can essentially test that the application is giving result that we expect.

v     Configuration element works same as samplers but does not send request. It can modify/add requests.

v     Pre-processor executes some action prior to a sampler request being made.

Post-processor is not often used to process the response data, often to extract values from it.

I hope the above information of the elements is quite enough to start with JMeter.
Now we will get into each element, in depth, later.