Service Test Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Service Test 11.2- How can I obtain the data from the response body using JSON

Advisor

Service Test 11.2- How can I obtain the data from the response body using JSON

Hi All

how to get an output from the JSON reply. i didnt see it HP ST 11.2. Can you please help me to get how to get an output like the SOAP where can create a new property that get an output.

 

I've dragged the HTTP request and selected Request Body and Response Body to " Text" and  there isn't a way I can create a new output property. I watn to extract a particular Proptery value. Can any one help please

 

 

Latha

 

5 REPLIES
Visitor

Re: Service Test 11.2- How can I obtain the data from the response body using JSON

[ Edited ]

Is there any plugin which needs to be used for enabling the Json Support in Service Test?

 

@Latha: You can use the custom code to verify the Json Response. Refer the below link which might help you to do so.

 

 

http://demon.tw/my-work/vbs-json.html#code

http://framework.lojcomm.com.br/app/docs/files/app/core/lib/json-class-asp.html

 

 

Kindly Suggest.

Advisor

Re: Service Test 11.2- How can I obtain the data from the response body using JSON

Thanks for the reply. But I want to do in the ST itself. Can i use this code in the ST to parse the Json reply? I thought we should use only C# code in ST. Is there any C# code to get an output from Json?

 

Thanks

Latha

Visitor

Re: Service Test 11.2- How can I obtain the data from the response body using JSON

[ Edited ]

You can use Custom Code feature in ST. You can find the VB script functions which can read Jscon Response ... The Function is present in the one of the link from the shared link earlier.

Advisor

Re: Service Test 11.2- How can I obtain the data from the response body using JSON

So the easy answer is upgrade to 11.52... if you need to just use 11.20 you can use the custom code activity or if you want to share it with other people easily make a custom activity.

 

 

Corey Bailey
Principal Consultant
Citizencrane Solutions
www.citizencrane.com
Highlighted
Advisor

Re: Service Test 11.2- How can I obtain the data from the response body using JSON

Thanks all of you