Load Testing a Website
A Bit of Theory
In Chapter 1, Quick Start with JMeter, we saw how to create and run a simple test case on a web application. In this chapter, we're going to go deeper into this part.
In order to access your web application, users will use the Hypertext Transfer Protocol (HTTP) protocol through their web browser.
The HTTP protocol is rather simple, and understanding it is of great help when writing a test script with JMeter. The role of HTTP is to exchange information between the client and the server.
As a picture says a thousand words:
Figure 7.1: A simplified view of the HTTP protocol
An HTTP request will have the following form:
- One, and only one, HTTP method line in the form HTTPMETHOD URI Protocol/Version
- Zero or more lines of headers in the form Header: Value
- Possibly an empty line, if the body is not empty
- Possibly the body of the request (the content)
For example, when accessing the European...