Run Test Step From Another Project

Applies to ReadyAPI 3.56, last modified on November 21, 2024

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['Test Suite Name'].testCases['Test Case Name']
tStep = tCase.getTestStepByName("Test Step Name")

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