Forum Discussion

fidzah's avatar
fidzah
Occasional Contributor
6 years ago

Use JSON respond to run TestStep2 after TestStep1 change respond from Running to Completed

Hi,

I'm new to groovy script, I have to check the value of the JSON respond (Status) that able to change from:

1)Pending

2)Queue

3)Running

4)Completed

 

JSON Respond

 

{
"Id":"1",
"Name":"Job 1",
"Status":"Completed", // this status can be change from pending, queue, running and lastly completed
"LastRunStartDateTime":"2019-04-18T22:00:01+08:00",
"LastRunDuration":"1m 35s"
}

Any idea how can I use for loop to check the TestStep 1 will keep on looping until the Status='Completed' and then next to run the TestStep2?