oleksii_is
9 years agoOccasional Contributor
Run TestCase from groovy, the execution doesn't fail if there are failed test steps
Hi,
I have a test case, which contains JDBC request and several assertions for the returned results. There is separate groovyscript test step where I call the test case wih JDBC request. The problem is that when there are failed assertions in called test step, the groovy test step is green and the execution is marked as passed (even so there were some failed assertion in JDBC request).
Here's how I call the test case from groovy:
def runner = testRunner.testCase.testSuite.getTestCaseByName("my name").run(null, true) runner.waitUntilFinished()
What could be wrong?
Thanks in advance!
P.S. I have pro-license.
Seems that the solution is to analyze status of testrunner when the execution has finished and fail manually if the status is failed.