cancel
Showing results for 
Search instead for 
Did you mean: 

Querry parameter to pass in response

SOLVED
Highlighted
Occasional Contributor

Querry parameter to pass in response

http://localhost:8003/getspell?check=ram 

i want to pass what ever value coming in check as my default repsonse

 

i tried ${#MockService#check}

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Querry parameter to pass in response

Hi @venkatayedida,

 

I think the reply given here will help you:

In a groovy script TestStep you can grab the response data from a Request TestStep using the "Get Data" menu.

https://support.smartbear.com/readyapi/docs/testing/properties/get-data.html

 

Then you can parse/modify the response as needed and pass it into a TestCase property through the following line:

context.testCase.setPropertyValue("Property Name","Property Value");

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Highlighted
Community Manager

Re: Querry parameter to pass in response

Hi @venkatayedida,

 

I think the reply given here will help you:

In a groovy script TestStep you can grab the response data from a Request TestStep using the "Get Data" menu.

https://support.smartbear.com/readyapi/docs/testing/properties/get-data.html

 

Then you can parse/modify the response as needed and pass it into a TestCase property through the following line:

context.testCase.setPropertyValue("Property Name","Property Value");

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors