Data collection is a key aspect of any load test. For most tests this data comes from request metrics such as response time, error rate, throughput, etc. However it is sometimes useful to capture data that is returned on the requested page itself. With JMeter, this is possible using the Page Data Extractor. This plugin can be used to directly plot data metrics returned from requests. Use cases include status monitoring, health checks, and other important data.
The Page Data Extractor plugin must be added to JMeter via the Plugins Manager, which can be found under the “Options” menu. Installing the plugin for the first time will require a restart of JMeter:
Configuring the Page Data Extractor
To understand how the page data extractor works, it is best to illustrate by example. The scenario given in the Page Data Extractor documentation has requests going to a page with the following data metrics returned in the HTML body:
This plugin uses regular expressions to find and match elements within the page body. In his example, the expression (serv.*)=
is used to extract a key, and the expression serv.*=(.*)<BR>
extracts the corresponding value:
Running the test with an HTTP Request sampler gives the resultant graph output. The same information can also be displayed as data rows from the “Rows” tab making it more conducive for export and further analysis.
Did you know that RedLine13 offers a full-featured, time-limited free trial? Sign up now, and start testing today!