Run Test Step From Another Project

Applies to ReadyAPI 3.9, last modified on July 16, 2021

This topic describes how to use Groovy script to run a test step from another project.

Where to use

There are two ways to run this script:

Example

Groovy

// Replace names of a project, test suite, case and step with those you need.

// Connect 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")

// Call the test runner and check if it can run the specified step.
def runner = tStep.run(testRunner, context)
log.info ("runner status ....... : " + runner.hasResponse())

See Also

Run Test Case From Another Project
Groovy Script Test Step
Groovy Scripting Samples
Scripting

Highlight search results