Hi!
1. Try
runner.getReason()
to get the message passed to fail(...).
2. Not sure what's the exact definition of a "pass message", but if you just want to add a message to the TestCase log, try adding
testStepResult.addMessage "My custom message"
to a
TestRunListerner.afterStep event handler.
Finally, if you want to save an object (such as your logger) you could use the TestSuite context like this:
In
TestRunListerner.beforeStepcontext.put("myInteger", new Integer(42))
and access it from the
Groovy TestStep like this:
log.info context.getProperty( "#TestSuiteRunner#" ).runContext.get("myInteger")
---
Regards
Erik, SmartBear Sweden