开发者

fail soapUI test case using groovy but dont abort

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜