by Dmitri Nevedrov
Performance testing is an important part of any distributed or Web application testing plan. Inclusion of performance estimates into planning and development cycles ensures that the application delivered to a customer satisfies high load, availability and scalability requirements. Early identification of software load limitations helps to configure the system appropriately to avoid unexpected crashes. Several questions should be addressed at system performance analysis: will the system or server be able to process simultaneous requests coming from hundreds, or thousands of clients, and, what is the frequency of requests the system can handle. This type of test not only provides an absolute measure of system response time, but also targets the regressions on server and application code, examines if the response from the server matches the expected result, and helps to evaluate and compare middleware solutions from different vendors.
Apache JMeter—a performance testing framework from Apache, has been widely accepted as a performance testing tool for Web applications. It can be used to analyze overall server performance under simulated heavy load. The software features FTP and HTTP requests and extensible custom scripting features. In this article we show how JMeter can be used to load test Web services. In particular we demonstrate it by deploying a simple Web service on BEA WebLogic Server 9.0. The example test plan illustrates the creation of a test plan, thread group, loop, and a Web service request. We also discuss how to measure the data and interpret results displayed on graphical tools provided with JMeter chart.
Apache JMeter is a tool that can be used to test applications utilizing HTTP or FTP servers. It is Java based and is highly extensible through a provided API. A typical JMeter test involves creating a loop and a thread group. The loop simulates sequential requests to the server with a preset delay. A thread group is designed to simulate a concurrent load. JMeter provides a user interface. It also exposes an API that allows you to run JMeter-based tests from a Java application. To create a load test in JMeter build a test plan, which is essentially a sequence of operations JMeter will execute. The simplest test plan normally includes the following elements:
A more detailed description of the available elements is given on the
Apache JMeter Web site. In some cases, when the available elements are not suitable for a particular test, a developer can write his or her own script or Java class and embed it into a test plan by placing a jar file into the JMeter installation
In this article we use JMeter version 2.1. Download a binary executable from the
Web site, unzip it, and the application is ready for use on Windows or Unix platforms. Go to the
bin folder and start the application with
jmeterw.bat if you work on the Windows operating system. The initial user interface is shown in Figure 1.
Figure 1. Starting Apache JMeter