You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by thrayambaka chitukula <th...@yahoo.com.INVALID> on 2015/04/26 08:18:01 UTC

JMeter WebService Request - JSon Response

Hi,
I just started learning JMeter. I got a question regarding webservice request for which the response can be displayed in XML or JSON. I tried a simple test case using get method from SOAPUI and REST API client (chrome extension). I see the response in XML and JSON.
However when I do the samething through JMeter, I do not see the actual content of the response, Response header status shows status as OK (status code 200) however I do not see the entire content of the response. For your reference I have the actual details that I got using Sample data writer. Can anyone provide information on how to get the entire content of the response?
<?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1"/>
<httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
</testResults>
Thanks,Raj

RE: JMeter WebService Request - JSon Response

Posted by Erez Naim <er...@theneura.com>.
Could be that you are missing authentication ? 
Another solution is that you can add BeanShell Postprocessor and then add the following line of code to this sampler:

String jsonString = prev.getResponseDataAsString();
System.out.println(jsonString);

Then you can see in the console window what was the response's content.

--Erez--

-----Original Message-----
From: thrayambaka chitukula [mailto:thrayambakac@yahoo.com.INVALID] 
Sent: Sunday, April 26, 2015 9:53 AM
To: JMeter Users List
Subject: Re: JMeter WebService Request - JSon Response

Sorry the correct response is provided below <?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="180" lt="180" ts="1430030829169" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
<httpSample t="179" lt="179" ts="1430030856223" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
</testResults>
 



     On Sunday, April 26, 2015 2:45 AM, thrayambaka chitukula <th...@yahoo.com> wrote:
   

 I tried that option also and for that the response is provided below <?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1"/> <httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
<httpSample t="759" lt="759" ts="1430030608797" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
</testResults>




     On Sunday, April 26, 2015 2:38 AM, Mark Miller <ma...@gmail.com> wrote:
   

 I think you have the "Save response as MD5 hash?" checkbox checked on your HTTP Sampler config.

Turn that off and it should return what you are expecting.

Hope that helps.

Mark

On Sun, Apr 26, 2015 at 12:21 AM thrayambaka chitukula <th...@yahoo.com.invalid> wrote:

> Hi,
> I just started learning JMeter. I got a question regarding webservice 
> request for which the response can be displayed in XML or JSON. I 
> tried a simple test case using get method from SOAPUI and REST API 
> client (chrome extension). I see the response in XML and JSON.
> However when I do the samething through JMeter, I do not see the 
> actual content of the response, Response header status shows status as 
> OK (status code 200) however I do not see the entire content of the 
> response. For your reference I have the actual details that I got using Sample data writer.
> Can anyone provide information on how to get the entire content of the 
> response?
> <?xml version="1.0" encoding="UTF-8"?><testResults 
> version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true"
> lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384"
> ng="1" na="1"/>
> <httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request"
> rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" 
> na="1"> <responseData 
> class="java.lang.String">d751713988987e9331980363e24189ce</responseDat
> a></httpSample>
> </testResults>
> Thanks,Raj


   

  


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter WebService Request - JSon Response

Posted by thrayambaka chitukula <th...@yahoo.com.INVALID>.
Sorry the correct response is provided below
<?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="180" lt="180" ts="1430030829169" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
<httpSample t="179" lt="179" ts="1430030856223" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
</testResults>
 



     On Sunday, April 26, 2015 2:45 AM, thrayambaka chitukula <th...@yahoo.com> wrote:
   

 I tried that option also and for that the response is provided below
<?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1"/>
<httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
<httpSample t="759" lt="759" ts="1430030608797" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
</testResults>




     On Sunday, April 26, 2015 2:38 AM, Mark Miller <ma...@gmail.com> wrote:
   

 I think you have the "Save response as MD5 hash?" checkbox checked on your
HTTP Sampler config.

Turn that off and it should return what you are expecting.

Hope that helps.

Mark

On Sun, Apr 26, 2015 at 12:21 AM thrayambaka chitukula
<th...@yahoo.com.invalid> wrote:

> Hi,
> I just started learning JMeter. I got a question regarding webservice
> request for which the response can be displayed in XML or JSON. I tried a
> simple test case using get method from SOAPUI and REST API client (chrome
> extension). I see the response in XML and JSON.
> However when I do the samething through JMeter, I do not see the actual
> content of the response, Response header status shows status as OK (status
> code 200) however I do not see the entire content of the response. For your
> reference I have the actual details that I got using Sample data writer.
> Can anyone provide information on how to get the entire content of the
> response?
> <?xml version="1.0" encoding="UTF-8"?><testResults
> version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true"
> lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384"
> ng="1" na="1"/>
> <httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request"
> rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">
> <responseData
> class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
> </testResults>
> Thanks,Raj


   

  

Re: JMeter WebService Request - JSon Response

Posted by thrayambaka chitukula <th...@yahoo.com.INVALID>.
I tried that option also and for that the response is provided below
<?xml version="1.0" encoding="UTF-8"?><testResults version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1"/>
<httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
<httpSample t="759" lt="759" ts="1430030608797" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">  <responseData class="java.lang.String">[]</responseData></httpSample>
</testResults>




     On Sunday, April 26, 2015 2:38 AM, Mark Miller <ma...@gmail.com> wrote:
   

 I think you have the "Save response as MD5 hash?" checkbox checked on your
HTTP Sampler config.

Turn that off and it should return what you are expecting.

Hope that helps.

Mark

On Sun, Apr 26, 2015 at 12:21 AM thrayambaka chitukula
<th...@yahoo.com.invalid> wrote:

> Hi,
> I just started learning JMeter. I got a question regarding webservice
> request for which the response can be displayed in XML or JSON. I tried a
> simple test case using get method from SOAPUI and REST API client (chrome
> extension). I see the response in XML and JSON.
> However when I do the samething through JMeter, I do not see the actual
> content of the response, Response header status shows status as OK (status
> code 200) however I do not see the entire content of the response. For your
> reference I have the actual details that I got using Sample data writer.
> Can anyone provide information on how to get the entire content of the
> response?
> <?xml version="1.0" encoding="UTF-8"?><testResults
> version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true"
> lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384"
> ng="1" na="1"/>
> <httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request"
> rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">
> <responseData
> class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
> </testResults>
> Thanks,Raj


  

Re: JMeter WebService Request - JSon Response

Posted by Mark Miller <ma...@gmail.com>.
I think you have the "Save response as MD5 hash?" checkbox checked on your
HTTP Sampler config.

Turn that off and it should return what you are expecting.

Hope that helps.

Mark

On Sun, Apr 26, 2015 at 12:21 AM thrayambaka chitukula
<th...@yahoo.com.invalid> wrote:

> Hi,
> I just started learning JMeter. I got a question regarding webservice
> request for which the response can be displayed in XML or JSON. I tried a
> simple test case using get method from SOAPUI and REST API client (chrome
> extension). I see the response in XML and JSON.
> However when I do the samething through JMeter, I do not see the actual
> content of the response, Response header status shows status as OK (status
> code 200) however I do not see the entire content of the response. For your
> reference I have the actual details that I got using Sample data writer.
> Can anyone provide information on how to get the entire content of the
> response?
> <?xml version="1.0" encoding="UTF-8"?><testResults
> version="1.2"><httpSample t="335" lt="335" ts="1430026276805" s="true"
> lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384"
> ng="1" na="1"/>
> <httpSample t="179" lt="179" ts="1430026434107" s="true" lb="HTTP Request"
> rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="384" ng="1" na="1">
> <responseData
> class="java.lang.String">d751713988987e9331980363e24189ce</responseData></httpSample>
> </testResults>
> Thanks,Raj