Forum Discussion

rf's avatar
rf
Occasional Contributor
11 years ago

How do I abort an infinite for/while-loop?

In some cases I want to use a for/while loop until a certain condition is achieved using a groovy script. If the condition is not achieved I have an infinite loop. Is there any way of aborting this loop without killing the SoapUI NG process using the task manager?

4 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    First thing is that, it is not related SOAPUI.
    If you use for loop, it will loop thru the certain number of times. In case of while you may terminate after certain retries or based on time limit.
    • rf's avatar
      rf
      Occasional Contributor
      Well, it is related to the SOAPUI-TOOL. But I do feel the need to clarify my question. If I in a groovy-script start an infinite for-loop (or while-loop). Is there a way to kill the loop manually withou exiting SOAPUI. Sorry for any mispellings, I wrote this on my phone :-(
      • nmrao's avatar
        nmrao
        Community Hero
        I humbly disagree with your comment as that was just related to programming language, not sopaui, in fact not even touchin any soapui's api.
        Any way, did you read the previous reply which has pointers how to do it?