JMeter Guidelines


Here are some guidelines you should find helpful when load testing a system with JMeter:

  • Use meaningful test scenarios, and construct test plans with test cases that represent real-world situations. Use cases provide an ideal nucleus around which to build your load tests.

  • Ensure you run JMeter on a separate machine from the system under test. This prevents JMeter from affecting the results of the test.

  • Testing is a scientific process, so conduct all tests under carefully controlled conditions. If you are working with a shared server, check first before starting a test that no one else on the team is also running a JMeter test plan against the same Web application.

  • Ensure you have adequate network bandwidth for the workstation running JMeter. You are testing the performance of the application and server, not your network connection.

  • Use several instances of JMeter running on different machines to add additional load on a server. This setup might be necessary for stress testing. JMeter can control instances of JMeter on other machines for this purpose. Refer to the JMeter documentation on distributed testing for more information.

  • Leave a JMeter test plan running for long periods, possibly several days or longer. This tests system availability and highlights any degradation in server performance over time due to poor resource management.

  • Don't run JMeter test plans against external servers for which you are not responsible. The owners may consider this a denial of service attack.

HttpUnit can also assist in the process of load testing. Although JMeter and HttpUnit are different types of testing tools, the two can complement one another to assess the performance of a Web application under load.

Using this combined approach, a JMeter test plan places the Web application under load while running the HttpUnit functional test suite. Assertions raised from the functional tests are an indication of load-sensitive defects.

When designing and executing load tests, remember every system has its limits. By running JMeter on enough machines, it is possible to exceed those limits. This is a valid test in itself, as the system should exhibit failsafe behavior for this scenario. However, the objective of load testing is to prove the ability of the application to meet the performance criteria stipulated in the nonfunctional requirements.

Design tests to prove a system's compliance with the customer's performance specifications. Simply deluging the system with requests will not confirm this, so make your testing scientific. Set yourself a target, and carefully design a test plan that will either prove or disprove whether the system meets the stipulated criteria.



    Rapid J2EE Development. An Adaptive Foundation for Enterprise Applications
    Rapid J2EEв„ў Development: An Adaptive Foundation for Enterprise Applications
    ISBN: 0131472208
    EAN: 2147483647
    Year: 2005
    Pages: 159
    Authors: Alan Monnox

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net