12 years ago
Can you force a teststep failure (without any assertions)?
I have implemented a TestRunListener.afterStep event listener in soapUI pro 4.6.4, and am attempting to write some groovy code (the language, and how awesome my code is ;-), and the purpose is to automate some testsuites that can be re-used for several restful resources. I wanted to implement my assertions in code to avoid having to insert 144 gui assertions in the user interface when it can be accomplished in about 15 lines of code in this event listener.
The main problem I have, is how to turn a teststep RED from the event script, that doesn't have an assertion.
Any help please?
I can fire an "assert fail:message", which shows up in the log as an error, but nothing seems to turn the teststep or testcase red (FYI - I only have one teststep per testcase - if that offers any type of solution).
I have tried doing testRunner.fail(message), testCase.fail(message), and a bunch of other things, but the documentation on this issue alludes me.
Thank you in advance
The main problem I have, is how to turn a teststep RED from the event script, that doesn't have an assertion.
Any help please?
I can fire an "assert fail:message", which shows up in the log as an error, but nothing seems to turn the teststep or testcase red (FYI - I only have one teststep per testcase - if that offers any type of solution).
I have tried doing testRunner.fail(message), testCase.fail(message), and a bunch of other things, but the documentation on this issue alludes me.
Thank you in advance