User999
3 years agoContributor
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")