Forum Discussion

JesB's avatar
JesB
New Contributor
9 years ago

How to extract RESTAPI response in JSON tab

Hi,

 

I am testing a REST API request to which i see the response in JSON tab. The response is just a number. Could someone help me with a groovy script for the assertions

 

1. I want to get the response in the JSON tab and store it in properties.

2. I want to assert that the response does not contain the error code.

 

Regards,

JesB

 

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi JesB,

     

    How are you getting on?

     

    If you still need help, please can you share examples of the response, including the error one, and I'll give you the Groovy code to extract it.

     

    Regards,

    Rupert