Call Another Test Case using Groovy script
RUN TEST CASE
def project = testRunner.testCase.testSuite.projectdef runner = project.testSuites['Suite_name'].testCases['testCase_name'].run( null, true )
runner.waitUntilFinished()
example :
def project = testRunner.testCase.testSuite.project
def runner = project.testSuites['TestSuite 1'].testCases['GenericKmauthtoken'].run( null, true )
runner.waitUntilFinished()
RUN TESTSTEP
def project = testRunner.testCase.testSuite.project
testRunner.runTestStep( project.testSuites['TestSuite1'].testCases['TestCase2'].testSteps['GroovyScript'] )
example:
def project = testRunner.testCase.testSuite.project
testRunner.runTestStep( project.testSuites['TestSuite 1'].testCases['GenericKmauthtoken'].testSteps['initialization'] )
Ref :
https://community.smartbear.com/t5/SoapUI-NG/Res-Calling-test-cases-and-test-steps/td-p/18186/page/2
Can you please help for property transfer? when the test case is called, if it's a post how can I transfer the properties to my current test suite? the test cases which are called are in a different test suite.
ReplyDelete