cancel
Showing results for 
Search instead for 
Did you mean: 

no way to stop groovy scrip stuck in endless loop

Highlighted
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
Highlighted

Re: no way to stop groovy scrip stuck in endless loop

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Frequent Contributor

Re: no way to stop groovy scrip stuck in endless loop

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!
Highlighted

Re: no way to stop groovy scrip stuck in endless loop

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Frequent Contributor

Re: no way to stop groovy scrip stuck in endless loop

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!
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors