Ask a Question

How to abort ALL current running testcases via Groovy

kenm
Contributor

How to abort ALL current running testcases via Groovy

Good morning fellow SoapUIers,

 

Is it possible to abort the current entire execution via a groovy script?

 

In my tests I basically have an async operation in setup I need to wait for it to complete and it'll retry a defined number of times before it's deemed a failure. What I would like to do, in the even that this fails, is abort the entire execution rather than pushing onto the subsequent test cases/test suites.

 

Is this possible. I just see testRunner.fail and testRunner.cancel available to me which both won't do what I require as I understand?

 

Appreciate any help in advance.

Thanks guys,

Ken.

10 REPLIES 10
groovyguy
Champion Level 0

I am not 100% aware there's a way to do this. You would have to find a way to mimic the pressing of the "Stop" button on the GUI. There's probably a way, but you would have to read up on the GUI/API documentation for ReadyAPI itself. I'll take a look when I get a chance to see if I can find anything.




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!

Thx for your response... I've had a quick run through the API documentation and in the context of TestRunner you can fail the test step or abort the testcase execution via Groovy however you don't seem to be able to do "more".... e.g. abort the Test Suite execution or, what I'm after, abort the entire execution at that point of time.

 

I've a sneaking suspicion it's not possible?

Olga_T
SmartBear Alumni (Retired)

@kenm, have you finally found a way how to abort the entire execution?


Community, maybe, does anyone have a guess how to do this?


Olga Terentieva
SmartBear Assistant Community Manager

groovyguy
Champion Level 0

I've been reviewing the ReadyAPI APIDOCS and do not see a way to trigger a test suite / test case to be forced to stop processing. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!

Thanks guys... I really appreciate your time on this!,

 

I'm afraid I haven't figured out a solution and I don't believe there is a mechanism to do cleanly through groovy. If the process has permission to kill itself I'm sure I could do it but SoapUI isn't going to exit cleanly and I doubt will produce reports etc. on completion.

 

Perhaps a change request/enhancement for SmartBear?

groovyguy
Champion Level 0

You can submit the idea for a feature request here: https://community.smartbear.com/t5/forums/postpage/board-id/ReadyAPIFeatureRequests 

 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Olga_T
SmartBear Alumni (Retired)

@kenm, I have contacted our support engineer to check whether there is really no way to accomplish your task from SoapUI now, and, unfortunately, it looks like it is so. And, the only way to do this now is, as you said, to kill the process itself, maybe with a third-party tool.


So, yes, you can make the appropriate feature request by the link that Matthew has provided so that our Product Team could consider this feature implementation. Other users can then vote for it to increase its rating.


In the meantime, if you find some suitable solution, please share it with us! Thank you in advance.


Olga Terentieva
SmartBear Assistant Community Manager

Thanks guys,

 

I've added the following feature request accordingly: https://community.smartbear.com/t5/ReadyAPI-Feature-Requests/The-capability-to-abort-entire-test-exe...

 

All those who would like to see it available feel free to jump over there and throw your weight behind it  🙂   Thanks in advance.

groovyguy
Champion Level 0

I added a comment and kudo'ed it. I can definitely see where this feature would be very useful if you want to stop on a certain condition but not due to regular errors. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
cancel
Showing results for 
Search instead for 
Did you mean: