ReadyAPI allows you to use a Groovy scripts to run multiple test cases at once, synchronize data between your projects, and process it in your tests.
This topic describes how to use Groovy script to run a test step from another project.
There are two ways to run this script:
The following code demonstrates how you can run a test step from another project of your choice using the built-in scripting objects of ReadyAPI:
// Replace names of a project, test suite, case and step with those you need.
// Connecting to the test step in another project.
def prj = testRunner.testCase.testSuite.project.workspace.getProjectByName("ProjectName")
tCase = prj.testSuites['TestSuiteName'].testCases['TestCaseName']
tStep = tCase.getTestStepByName("TestStepName")
// Calling the test runner and checking if it can run the specified step.
def runner = tStep.run(testRunner, context)
log.info ("runner status ....... : " + runner.hasResponse())