Forum Discussion

doubtsreadyapi's avatar
doubtsreadyapi
Contributor
5 years ago

Groovy script for executing the next step depending on the previous response parameter

Hi,    I am running a testsuite in readyAPi, I am doing a GET  method Request , In GET method response i have response parameter Status, Until the status value is changed to completed i dont want t...
  • richie's avatar
    richie
    5 years ago
    Hey doubtsreadyapi,

    Im not sure if the step supports json...according to the 'help' id say it doesnt. Im not in front of my laptop to check at the moment.
    Easiest way to check....add the conditional goto step into a test case immediately after your RESTstep that generates your json response, execute your RESTstep and via the conditional goto step, click on the button in the conditional goto step to try and read the RESTstep's response.
    Does it parse the json content ok? If yes you can use the conditional goto step. If it doesnt, you cant use it and youll have to revert to a groovyscript option (@nmrao and @HimanahuTayal may have alternative code to do what you need as im not a coder but they are)

    Nice one!

    Rich