Is there anyway to parameterize a REST APIs Query PARMS?
- 7 years ago
Hi richie,
It should work but it is not ${TestCase#value} but ${#TestCase#value}.
ReadyApi has the following rules:
1. If you define the scope you put a # in front of it like in: {#TestCase#...}, {#Project#...} or ${#TestSuite#...}
2. If you are reffering to a test step you use it without a # like in ${GetSessionId#...}
Cheers!
- 7 years ago
using groovy we can add parameters at run time.kindly, try the below code snippet:-
*********************************************************************
def step=testRunner.testCase.getTestStepByName("REST")
def req=step.httpRequest
req.removeProperty("name")
req.getParams().each{
log.info it.value.name
}//required to add field before setting the value
req.addProperty("name")// set the new field value
req.setPropertyValue("name","abc")******************************************************************
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.