Forum Discussion

krogold's avatar
krogold
Regular Contributor
6 years ago
Solved

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 ?

 

 

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

3 Replies

  • Lucian's avatar
    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.

    • krogold's avatar
      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

      • Lucian's avatar
        Lucian
        Community Hero

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