Forum Discussion
- HumashankarChampion Level 3
Hi Sirisha2020
Give a try with the below Groovy,
// Loop through the range of values
for (int i = 1; i <= 10; i++) {
// Set the 'id' property for each iteration
testRunner.testCase.setPropertyValue("id", i.toString())
// Optionally, trigger the REST request step (if you want it to execute on each loop)
// Assuming the REST request step name is 'YourRESTRequestStep'
def testStep = testRunner.testCase.getTestStepByName("YourRESTRequestStep")
if (testStep != null) {
testRunner.runTestStepByName("YourRESTRequestStep")
} else {
log.error "Test step 'YourRESTRequestStep' not found."
}
}
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
Related Content
- 6 years ago
Recent Discussions
- 10 days ago