Enabling extended error logging in JMeter

Here's a simple way to log request and response information for each HTTP error in JMeter.

In some testing scenarios especially when faced with errors being received at very specific conditions - you may want to understand what is happening on a more granular level.

With JMeter you are able to capture every single request and response and output it to a file using the in-built functionality of the View Results Tree addin.

DISCLAIMER: We generally tell our customer's to disable the View Results Tree when running your final tests for two main reasons:

  1. Reporting-based add-ins such as the View Results Tree tend to take up Grid node CPU usage as well as increase the size of archives due to the logs being created and stored on each node.

  2. Flood has it's own Reporting engine that does not use the reporting-based add-ins from JMeter so it is not needed when running through the platform.

We'll be saving it as an XML file - with all Request Headers and data, response codes and data, and some timestamps and connect time information.

This should give us enough information on any errors that we may observe during a test to see what is happening.

The <responseData> tag shows the full 500 page error response being returned by the target server.

In the <queryString> tag we can see the exact request we sent to get the 500 response. This kind of information is very helpful as it may be data contained within the request that is causing the issue. ​

Last updated