
This article will provide a way to capture response data from Apache JMeter™. By default, the response data from JMeter samplers is not stored in the JTL file. The reason is that response data tends be of large volume, which in turn might create a huge JTL file, even for a relatively small test.
However, for debugging purposes, it may be necessary to capture a sampler's response data. This can be accomplished in two ways:
- Run a DEBUG test as explained in this article. This will cause the test to run on a single engine with 10 threads and only for a duration of 5 minutes or 100 iterations whichever comes first. It will result in a trace.jtl file with response data contained for both successful and failed samplers. This is the preferred way as it automatically limits the number of threads and duration, thus preventing the generated jtl file becomes huge.
- Run the test as usual. All load configuration properties are taken into account. However it will result in an error.jtl file with response data contained for failed samplers only, the kpi.jtl will not have response data.
After the test is completed, download the artifacts.zip file from the logs tab:
Unzip artifacts.zip and open the trace.jtl / error.jtl in JMeter's View Results Tree Listener. The samplers are listed. When selected, the response data can be examined.
The samplers show the response data necessary for debugging. When done, make sure to remove the listed JMeter properties from the BlazeMeter test if you selected the second option for collecting response data.
If you want to learn more JMeter, sign up to our free JMeter academy.
0 Comments