jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Response data is included in XML reports even when the Save Response Data configuration option is de-selected

Open dbaer727 opened this issue 2 years ago • 5 comments

Expected behavior

When the Save Response Data option in the listener report file configuration window is de-selected the response data is NOT written to the XML report.

Actual behavior

When the Save Response Data option in the listener report file configuration window is de-selected the response data is written to the XML report.

Steps to reproduce the problem

Using JMeter version 5.5:

  • Create a Thread Group
  • Add and configure a HTTP Request that access and retrieves data from an API
  • Add a Listener such as View Results Tree
  • Select the Listener and enter a filename in the 'Write results to file / Read from file' field
  • Click the Configure button to configure the report
  • Select the 'Save as XML' option
  • Verify that the 'Save Response Data' option is not checked
  • Click the Done button
  • Start the test
  • After the test is complete open the Listener report file

Result: The report file contains the API response data in the XML report file in the 'responseData' element

Expected Result: The report file does not contain the API response data

JMeter Version

5.5

Java Version

1.8.0_241

OS Version

Microsoft Windows [Version 6.1.7601]

dbaer727 avatar Jun 10 '23 00:06 dbaer727

Hi @dbaer727 JMeter worked normally when I reproduced the issue. It did not store response data in XML file when option was unchecked in Save Configuration.

Java Version

18.0.2.1

OS

Windows 10 Pro

Ninja-Cyborg avatar Jun 15 '23 02:06 Ninja-Cyborg

Interesting. I just tried it on my Windows 11 installation running Java 20.0.1 and still see the responseData in the saved XML. Which listener type are you trying with? Are there any settings that might override the Save Configuration settings that cause the responseData to still appear in the file? Are there any logs that might help isolate the cause? jmeter saves responseData

dbaer727 avatar Jun 15 '23 03:06 dbaer727

I used View Result Tree. I performed GET List Users from https://reqres.in/

image

Regarding configuration file, I tried changing user.properties and jmeter.properties. By default, these two values are commented and false, setting true did not override XML reports, at least not when ran through GUI.

image

Ninja-Cyborg avatar Jun 15 '23 04:06 Ninja-Cyborg

I looked through my properties files as well and see the same. I'm thinking it must be caused by something in my JMX. To confirm I created a new test plan with the basic components you tried and got the same result you did, no responseData in the XML.

The JMX file I'm using when I have the problem logged in the bug I created by recording API requests while navigating the website that is being tested and saving the HAR file. I then used Blazemeter's HAR to JMX converter to create the JMX. From their I modified the JMX to my needs. So I'm thinking Blazemeter must be sticking something in there that's causing this.

I'm going to try adding components into my new, clean, JMX one-by-one so that it mirrors the JMX that I use when I end up with responseData in my XML file and see if it starts happening.

dbaer727 avatar Jun 15 '23 06:06 dbaer727

I figured out what was causing this. The setting "Functional Test Mode" in the Test Plan and the "Save Response Data (XML)" in the Sample Result Save Configuration will both turn on saving this data to the log. If one or both of these options is enabled then responses will get saved. If you turn it off on one and leave it on in the other location then responses will still get saved.

dbaer727 avatar Dec 18 '23 21:12 dbaer727