Ask a Question

no way to stop groovy scrip stuck in endless loop

Awesome
Frequent Contributor

no way to stop groovy scrip stuck in endless loop

so i have a groovy script calling a class i created in the scripts folder.

unfortunately i had an endless loop bug in my class. the script kept running and there doesn't seem to be a way to force stop /break out of a groovy script.. is there?

thanks!
4 REPLIES 4
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi!

sorry, there isn't any good way to do this is far as I know; groovy scripts are compiled into byte-code and executed like any other java code and there is no safe way to terminate such a thread..

regards,

/Ole
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Awesome
Frequent Contributor

darn, so if i run into this again, or if i want to stop a log running script is the only option to force quit soapui?

i guess this will force me to write perfect code every time!
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

well, it depends a bit on when this happens; if you are running a TestCase/TestSuite or groovy-script step, those are run in seperate threads so you should still be able to save your work, but (as you say) you'll still have to kill soapUI to stop the script.. sorry..

regards!

/Ole
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Awesome
Frequent Contributor

yes, i can still save my work.

i'm not sure if there is a better way to do this, but i edit my classfiles.groovy using an external editor and then within soapui groovy step i call the class. having to use an external tool makes it a bit confusing to keep track of everything, so i've made a couple of coding mistakes along the way... i guess i should try to run everything within eclipse maybe?

anyways, thanks as always for your help!
cancel
Showing results for 
Search instead for 
Did you mean: