Created attachment 37196 [details] xml from Simple Data Write I am testing a Desktop Application that in certain responses does not send a Content-Type header (that is the app default behavior and cannot be modified). This behavior makes that JMeter sets that attribute as an empty string in the sampler result so when it tries to write the response body it fails with the following message: "Non-TEXT response data, cannot record: ()". Apart from that missing header, I can notice that server is responding with some message because the Content-Length is 101, but I cannot see the actual response because of this behavior. The thing is, I understand this is JMeter's expected behavior in these cases but from a testing perspective, it would be useful that JMeter does not lose the response even when it is not a String, maybe it can be at least logged in the JMeter log or specified in the sampler result somehow.
You can workaround this by using a JSR223 Post Processor that can set the content type to a text one. As you wrote it, empty content type does not look correct so I don't think we should fix this.
(In reply to Philippe Mouawad from comment #1) > You can workaround this by using a JSR223 Post Processor that can set the > content type to a text one. > > As you wrote it, empty content type does not look correct so I don't think > we should fix this. Thanks for the workaround, I will definitely use it. I understand what you say but there are two other things here, one is that JMeter is doing nothing to defend itself from these kinds of situations. And the other is that the assertion over that response is being applied as it was a text response but then it is not able to record it, it is not a consistent behavior. Thanks for the quick response.
(In reply to Matias Fornara from comment #2) > (In reply to Philippe Mouawad from comment #1) > > You can workaround this by using a JSR223 Post Processor that can set the > > content type to a text one. > > > > As you wrote it, empty content type does not look correct so I don't think > > we should fix this. > > Thanks for the workaround, I will definitely use it. > > I understand what you say but there are two other things here, one is that > JMeter is doing nothing to defend itself from these kinds of situations. Such situation is abnormal according to RFC. How are we supposed whether content is binary or text without content-type ? > > And the other is that the assertion over that response is being applied as > it was a text response but then it is not able to record it, it is not a > consistent behavior. The behaviour is that if it's binary we don't save it to XML > > Thanks for the quick response.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5295