开发者

fail soapUI test case using groovy but dont abort

开发者 https://www.devze.com 2022-12-28 16:22 出处:网络
I have a number of test cases using groovy. I want to be able to have the test case fail but to carry on with the rest of the script.Tried using:

I have a number of test cases using groovy.

I want to be able to have the test case fail but to carry on with the rest of the script. Tried using:

testRunner.fail(开发者_如何学Go "It didn't work" )

also tried

assert false : "It didn't work"

but they both abort the test case even if the abort on error is unchecked.

Any ideas?


The usual way to fail a test case is to call the fail() method of Junit, rather than using assert or testRunner.fail(). However, I'm not sure whether tests subsequent to a failed test will be executed.

This fail method is either a static method of Assert or an instance method of TestCase depending on whether you're using JUnit 4 or 3.8.

0

精彩评论

暂无评论...
验证码 换一张
取 消