Ask a Question

How to stop a testCase ?

SOLVED
krogold
Regular Contributor

How to stop a testCase ?

Hello,

I encounter a simple problem : I have many testCases and I created upper level test cases that can chain all those test cases (with a special tag). The problem is that I evaluate the tag in a groovy step, if it is set, I run the testCase. If it happens that a failure appears in the log, I want to stop the test and fix the problem, but it will run until the groovy script ends. Of course, none of my testCases is blocking on failure as, in an operational process, I need to run all of them and check at the end.

Why is it not possible to 'kill' a test run ?

 

 

3 REPLIES 3
Lucian
Community Hero

Well the problem is that you cannot manually stop the groovy execution. You could do something like: (pseudocode here) 

run each test case that contains tag {
    if (testcase.result == FAILED)
       BREAK
}

Would something like this help? If yes then just post your groovy here and I'll try to help you.



If my answer helped please click on the 'Accept as Solution' button.
krogold
Regular Contributor

Well, in fact I would like to be able to stop it at will.

In the process I don't want to stop it as I need to run all the tests as no regression, then highlight regressions. But in my process of developping tests, sometimes I'd like to stop it before it ends and it does not work ...

I could try to create a reference file with my test case list and use it as a datasource. in that case, the loop will stop before starting the next iteration ... but it's extra work that's probably not worth

 

thanks anyway

Yeah for now ReadyApi lacks this functionality... this of course sucks but that's all we got :). There have been numerous requests on this...



If my answer helped please click on the 'Accept as Solution' button.
cancel
Showing results for 
Search instead for 
Did you mean: