Toad World® Forums

Infinite loop


#1

Hello,

I have a function with an infinite loop. How can I test without crash QCTO?

Thank for your help.


#2

I always hate to say something like this, but I don’t think Code Tester can help you here.

This product treats your program as a “black box”. If your program goes off into an infinite loop, there isn’t much we can do.

Having said that, I attach to this message a “loop killer” package I wrote that you may want to put to use in this program.

Regards, SF
loop_killer.zip (1.14 KB)


#3

Hello Steven,

may I suggest an idea for a future release ? :wink:

It could be interesting to have a new Test Type for the “Elapsed Time” outcome, like “no more than X seconds and then timeout”. So if you specify it, it would generate a failed test when the X seconds are reached.

But I have no idea about the complexity of this feature so it’s up to you to think about it. :wink:

Best regards,
Samuel.


#4

Thanks, I will add this to our list of ERs.