0

It is explained here how to run one step of a testcase in same test suite

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

I want to run all steps of a test case in another test suite : how ?

I tried to reference testsuite with testSuites ["my test suite"] but it does not like

Community
  • 1
  • 1
user310291
  • 36,946
  • 82
  • 271
  • 487

2 Answers2

2

Here is the script from the link, assuming that suite name, case name are "TestSuite 1", "TestCase 1" respectively

def tCase = testRunner.testCase.testSuite.project.testSuites["TestSuite 1"].testCases["TestCase 1"]
tCase.run((com.eviware.soapui.support.types.StringToObjectMap)context, false)
Opal
  • 81,889
  • 28
  • 189
  • 210
Rao
  • 20,781
  • 11
  • 57
  • 77
1

You can also go by the following to run a particular step,

projectName = testRunner.testCase.testSuite.project
tSuite = projectName.testSuites["RequiredTestSuiteName"]
tCase = tSuite.testCases["RequiredTestCaseName"]
tStep = tCase.testSteps["RequiredTestStepName"]
tStep.run(testRunner, context)
Eiston Dsouza
  • 394
  • 2
  • 13