Book Image

Apache JMeter

By : Emily H. Halili
Book Image

Apache JMeter

By: Emily H. Halili

Overview of this book

<p>A bad response time on a website can drive away visitors and prospective customers. To measure what a website can handle, there should be a way to simulate and analyze different load scenarios&acirc;&euro;&rdquo;this is where a load-testing tool like JMeter comes in. JMeter is a powerful desktop performance tool from the Apache Jakarta project, written in Java, for load-testing web pages, web applications, and other static and dynamic resources including databases, files, Servlets, Perl scripts, Java Objects, FTP Servers, and more.<br /><br />JMeter works by acting as the "client side" of an application, and measures response time. As such, it's one half of the testing arsenal; the other half consists of a tool to watch metrics on the server side, such as thread counts, CPU loads, resource usage, and memory usage. Although it can't behave like a browser to measure rich client-side logic such as JavaScripts or Applets, JMeter certainly measures the performance of the target server from the client's point of view. JMeter is able to capture test results that help you make informed decisions and benchmark your application.<br /><br />This book introduces you to JMeter (version 2.3) and test automation, providing a step-by-step guide to testing with JMeter. You will learn how to measure the performance of a website using JMeter.<br /><br />While it discusses test automation generally, the bulk of this book gives specific, vivid, and easy-to-understand walkthroughs of JMeter's testing tools showing what they can do, and when and how to use them.</p>
Table of Contents (16 chapters)

Extending the Web Test Plan


This section will help to give us more insight into how we can build a more robust, and flexible Web Test Plan. We will see how we can incorporate various features into a Test Plan, including Regular Expressions and Functions. To effectively demonstrate the use of these features, I have prepared beforehand a Functional Test Plan using a simple web application on the localhost as the target server. You can download this from the code bundle of Chapter 7 available on our website. The volsys.rar folder needs to be unzipped into the apps folder of the target application folder.

This simple application, Volsys, keeps contact information about its network of volunteers and maintains a schedule of work assignments for these volunteers. In brief, it allows the user to:

  1. Log in to the application (the administrator is the only user, for now).

  2. Add Volunteers—each registered volunteer will be assigned a unique volunteer ID.

  3. Add Assignments—each registered assignment will be assigned...