Is it possible to run specific test steps in other Test Cases from a Groovy Script test step

Mihail picture Mihail · Feb 26, 2014 · Viewed 31.5k times · Source

Is it possible to run specific test steps in other Test Cases from a Groovy Script test step?

Can't figure out how to do this

Thank You

Answer

Abhishek Asthana picture Abhishek Asthana · Feb 26, 2014

Yes it is possible. From the groovy step you have access to the testRunner which you can use to access everything else in soapUI and yes run test steps in another test case.

So, this code is from the top my my head...

def tCase = testRunner.testCase.testSuite.project.testSuites["Name of the other test suite"].testCases["name of test case you want to access"]

or

def tCase = testRunner.testCase.testSuite.testCases["Name of test cases"]

def tStep = tCase.testSteps["test step you want to run"]

tStep.run(testRunner, context)

Check out this link it might be of some help...