When designing a web architecture, it is crucial that the server be capable of handling heavy loads. While this is an important requirement of any web design project, it is also difficult to perform realistic testing with human users. The sheer number of users and machines needed to provide a realistic test make such manual methods prohibitive. This is where utilities such as JMeter step in, making such “load testing” possible without legions of volunteers.

JMeter is an intuitive program built as a Java desktop application, featuring a Swing based user interface. Whereas testing utilities such as LoadRunner rely on a more programmatic approach, JMeter operates on a visually object based paradigm. Construction of a load testing scenario in JMeter begins with an empty tree, to which Thread Groups are added. Each Thread Group represents an individual client interacting with the server. To simulate the ebb and flow of users, Thread Groups can be given a timer.

The tree model expands as testing objects are added to the Thread Groups. Objects can generally be categorized as Samplers, Logic Controllers, and Assertions. Samplers provide the HTTP requests that a user would make while interacting with the server. Logic Controllers dictate the circumstances under which Samplers are fired, allowing the operator to have some control over the flow of testing. An Assertion checks the data returned, allowing the operator to run regular expressions on the response.

JMeter client machines can only generate so many concurrent threads, limiting the number of test users. When a test calls for more users than a machine can handle, the system employs JMeterEngine to bring other machines into the workload. This allows the operator to chain multiple machines together in an effort to create as many users as possible.

Similar Posts