Monday, 9 September 2013

Welcome to JMeter Testing


Apache JMeter:

The Apache Jmeter desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

What can I do with it?

Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.


SetUp:
Download the zip and play with that
  • JMeter needs JVM 1.5 or Higher to be installed in the system
  • Download the Zip from Apache JMeter site – jmeter.apache.org/‎
  • Extract the zip file
  • To run the GUI goto JMeter_Home/bin
Execute the jmeter file
– For windows machines, Double click on the jmeter.bat file
– For Linux/mac machines, In the Bash Shell go to Jmeter_home/bin location, Just type jmeter and execute the command
during the test run you may get into a familiar exception called as “Out of Memory Exception” for that you may need to run the jmeter with the jar and the possible actions as
$ java -Xms128m -Xmx1028m -jar apacheJMeter.jar
Xms – Specifies the Min heap size
Xmx – Specifies the Max heap size


We need to know About following Element:
1.Test plan:
A test plan describes a series of steps JMeter will execute when run. A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements.

2.Thread Group:

Thread group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group.  
3.Controler :


JMeter has two types of Controllers: Samplers and Logical Controllers. These drive the processing of a test.
Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler.
Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers.


 
4.Listner: We are using listner for seeing the result of the test case