Forum Discussion
I wanted to use those extracted ids into another REST request by adding datasource loop. That's why wanted to generate those in data source and use them in another REST request.
I am not sure how i can set data source rows with extracted ids using groovy script of data source. Could you please help?
Can't you use data source of groovy type?
- sumeetb8 years agoOccasional Contributor
I can but i am not able to set the property variable named as "id" with multiple rows. Please see below script.
import net.sf.*
import net.sf.json.*
import net.sf.json.groovy.*
def response = context.expand('${Get Summary#Response}' )
def jsonSlurper = new JsonSlurper().parseText(response)
for(String id:jsonSlurper.summary.test.id){result["id"]=id
}
The result i get is property variable "id" is getting set with last value only (with this only 6780837264054677)
- nmrao8 years agoChampion Level 3Can you show test case structure?
Related Content
- 5 years agoDenesIsti