Forum Discussion
Have you tried this snippet? This is what I have used in the past to get the current test step name.
def teststepName = context.testCase.getTestStepAt(context.getCurrentStepIndex()).getLabel() return teststepName;
- zorglups6 years agoOccasional Contributor
Hello msiadak,
Thank you so much for your fast reply.
My DataGen testStep name is "MyDataGen".
My SOAP operation testStep name is "checkAccessControl".
It contains: <context>${MyDataGen#context}</context>
The 'context' property of the MyDataGen DataGen TestStep is of type Script/READ and contains this:
def teststepName = context.testCase.getTestStepAt(context.getCurrentStepIndex()).getLabel()
return teststepName;
Upon execution of the checkAccessControl testStep, the variable evaluates to MyDataGen as seen in the Raw tab:
<context>MyDataGen</context>
I was in a hurry to come to the office this morning to test your suggestion :-(
Unfortunatelly, this does not address my issue.
Related Content
- 4 years ago
Recent Discussions
- 2 days ago