Lucian's avatar
Lucian
Community Hero
6 years ago
Status:
New Idea

Make it possible to stop groovy script execution

For now there is no possible way to stop a groovy script from executing. If you create an infinite loop for example the application will crash in no time giving you no other option but to stop ReadyApi and start it all over again.

 

This happened to me a few times and it's pretty annoying.

4 Comments

  • Status changed:
    New Idea
    to
    New Idea

    Have you tried the following code:

    testRunner.cancel( "I'm getting tired" )

    if you want to fail it use
    testRunner.fail( "It didn't work" )

  • Lucian's avatar
    Lucian
    Community Hero

    Hey, that's not gonna work. 

     

    The problem is that if you make a mistake and you create a big/ infinite loop there is no way to stop the execution of the script. Once you started it you can just wait for ReadyApi to crash...

  • Yes for supppose someone haven't use foloowing:

     

    try and catch block or

    testRunner.cancel or

    testRunner.fail

     

    then there is no mechanism by which i can stop the execution of Groovy Step.

    There must be a stop button by which i cant stop the execution at any time .

  • I would also like to see a stop button implemented. I have a test case that checks logs after all the requests have been made. This groovy script can take up to 20 minutes to verify the logs for all the requests made. It would be nice to be able to stop it if we have issues.