tstmartin
14 years agoContributor
How to find the parent Test Case of a Run TestCase step?
I have a Groovy script (MyGroovyScript) in a common test case. That test case is being used in other test cases using a Run TestCase test step. I need to determine from within MyGroovyScript what...
- 14 years agoHi!
The context available in your groovy script should contain a property named "#CallingRunTestCaseStep#" holding the calling Run TestCase TestStep, so you should be able to do:
def calling = context.getProperty( "#CallingRunTestCaseStep#" )
if( calling != null )
{
log.info( "Being called by " + call.testCase )
...
}
Does that work ok for you?
regards!
/Ole
eviware.com