zorglups
6 years agoOccasional Contributor
Get current TestStep.operation from a DataGen property of type script.
In a Test Step, my SOAP request contains <context>${DataGen#context}</context>
DataGen is ... a DataGen TestStep that defines a property 'context' of type Script (READ).
In the script, I tried:
def tstep = testRunner.runContext.currentStep.name;
return tstep
def currentTestStep = context.getCurrentStep().getLabel()
return currentTestStep
But then ${DataGen#context} evaluates to 'DataGen' while I would like it to evaluate to the current TestStep name.
Well... Ultimately, I would like to have the current TestStep operation.name and based on this apply some logic to define the context. So the DataGen script is needed.
I just fail to get properties of the TestStep properties from which the DataGen properties is "evaluated".
Any help is welcome.