You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 冯子廷 <fo...@foxmail.com> on 2021/11/15 06:38:59 UTC

How can I get the actual content of the response from the file?

Hi!
jmeter-5.3
I run a load test of the http interfaceuse and I use ‘JSON Assertion’ for result verification.
From the Dashboard of the test results, I found that some of the JSON Assertion results are as follows:-------------------------------------------------------------------------------------------------------------------------------------------------
Expected to find an object with property ['totalRows'] in path $['data'] but found 'null'.This is not an json object according to the JsonProvider:
'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.
-------------------------------------------------------------------------------------------------------------------------------------------------


The other part of the response of the http interface is as follows:
-------------------------------------------------------------------------------------------------------------------------------------------------
Response Body:Non-TEXT response data, cannot record:()
-------------------------------------------------------------------------------------------------------------------------------------------------


What do these two results mean?
How can I restore the actual content of the above two responses from the existing .jtl?

I need help, please.


Best Regards!

Re: How can I get the actual content of the response from the file?

Posted by Dmitri T <gl...@live.com>.
If you use default JMeter's Results File Configuration 
<https://jmeter.apache.org/usermanual/properties_reference.html#results_file_config> 
- there is no way to restore response data from the .jtl file because 
it's simply not being stored.

The options are in:

 1. Add the next lines to /user.properties/ file (lives in "bin" folder
    of your JMeter installation)
      * jmeter.save.saveservice.output_format=xml
      * jmeter.save.saveservice.response_data=true
 2. Or add a separate listener like Simple Data Writer
    <https://jmeter.apache.org/usermanual/component_reference.html#Simple_Data_Writer>
    and configure what, where and how to store

1st option will switch JMeter's .jtl results file 
<https://cwiki.apache.org/confluence/display/jmeter/JtlFiles> to XML 
format and instruct JMeter to store response data. As a side effect 
results flushing will increase resources footprint, especially disk IO 
and you won't be able to generate the HTML Reporting Dashboard from the 
.jtl file in XML format.

2nd option seems reasonable workaround, when you figure out the root 
cause of the issue just disable the listener.

More information: How to Save Response Data in JMeter 
<https://www.blazemeter.com/blog/how-to-save-response-data-in-jmeter>

On 11/15/2021 7:38 AM, 冯子廷 wrote:
> Hi!
> jmeter-5.3
> I run a load test of the http interfaceuse and I use ‘JSON Assertion’ for result verification.
>  From the Dashboard of the test results, I found that some of the JSON Assertion results are as follows:-------------------------------------------------------------------------------------------------------------------------------------------------
> Expected to find an object with property ['totalRows'] in path $['data'] but found 'null'.This is not an json object according to the JsonProvider:
> 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> The other part of the response of the http interface is as follows:
> -------------------------------------------------------------------------------------------------------------------------------------------------
> Response Body:Non-TEXT response data, cannot record:()
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> What do these two results mean?
> How can I restore the actual content of the above two responses from the existing .jtl?
>
> I need help, please.
>
>
> Best Regards!