Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

soapui

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

like image 710
Mihail Avatar asked Feb 26 '14 16:02

Mihail


1 Answers

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...

like image 197
Abhishek Asthana Avatar answered Oct 13 '22 09:10

Abhishek Asthana