Test Step "Run TestCase" How to get test step index of parent test case?
Hi all. I have a REST Project (I'm using SoapUI Pro) where I'm a little stuck.
In Test Case A I am using a test step "Run Test Case B". Inside of Test Case B I have a single step: a Groovy script. In this Groovy script I need to extract some information about Test Case A (specifically, test step index). How can I do that?
(This is a simplified example. In reality I have several test cases where I have a "Run Test Case B" test step, hence I can't make assumptions about the name of the parent test case etc).
Code snippet from the Groovy script in Test Case B:
...
def currentStepIndex = context.currentStepIndex //Loops back to the previous step x times if(loopCounter < maxLoopCount) { loopCounter++ testRunner.gotoStep(currentStepIndex-1) } ...
context.currentStepIndex gives me the test step index in Test Case B, but I need to get the test step index in Test Case A.
(I've put this loop script into a separate test case for code reuse/maintenance reasons)
Thanks for your help. And sorry for posting this in the wrong forum at first, noticed it only now.