Require Groovy script for Parameterizing the value in next request
Hi
My GET Method response is like below, But when i do get once the Id changes and the place "journals|0_0_7|JOURNALS_PART_ONE" and "journals|0_0_7|JOURNALS_MAPPING" changes, that is some times "journals|0_0_7|JOURNALS_MAPPING" comes 2nd in the response and some times it will come last.
So i require a groovy script depending upon the Pack id i must get the "id" and parameterize that "id" to the next request.
"dependencies" : [
{
"id" : 13311,
"pack_id" : "journals|0_0_7|PART_TWO",
"status" : "not_started",
"output" : null,
"run_id" : null
},
{
"id" : 13312,
"pack_id" : "journals|0_0_7|PART_ONE",
"status" : "complete",
"output" : null,
"run_id" : ""
},
{
"id" : 13313,
"pack_id" : "journals|0_0_7|MAPPING",
"status" : "waiting",
"output" : [
{
],
Hope the question is clear and please help in groovy script.
Thanks
Thanks.
However, it appears that you have picked up part of the response from middle of a response.
Using below similar type of solution, you should be able to work it out for the original response.
https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/json/QueryRelativeData.groovy
Need complete hierarchy of the response, it is fine even if it is sample one if you still have issues.