Forum Discussion

User999's avatar
User999
Contributor
3 years ago

Clone Test STEP Using Groovy

I am using ReadyAPI and I am trying to clone a test STEP into all the Test Cases I have within the Test Suites. I have tried the following to copy Test Step from Test Case and insert the same Test Step into "Test Case 1" and then if that worked I could copy it into "Test Case 2" etc...

 

def slaveTestCase = testRunner.testStep.testCase.testSuite.project.getTestSuiteByName("Test Suite").getTestCaseByName("Test Case").getTestStepByName("Test Step")


testRunner.testStep.testCase.testSuite.project.getTestSuiteByName("Test Suite").getTestCaseByName("Test Case 1").cloneTestCase(slaveTestCase,"Test Step")

No RepliesBe the first to reply