Forum Discussion
- KarelHusaChampion Level 2
Ganitha ,
you can automate this by a Groovy script:
project = context.getTestCase().getTestSuite().getProject()
step = project.getTestSuiteByName("MySuite").getTestCaseByName("MyCase").getTestStepByName("ToBeCloned")
project.getTestSuiteList().each {
testSuite = it
testSuite.getTestCaseList().each {
testCase = it
testCase.cloneStep(step, "TheNameOfTheCloned")
}
}How it works:
- First get a test step you want to clone (ToBeCloned)
- Go through all test suites
- Loop through all test cases within the suite
- Clone a selected test step into current test case (you can set a new name)
I recommend to do a backup of your SoapUI project.
Then you can place this script into a Groovy script test step, modify the names a run it.
Best regards,
Karel
- richieCommunity HeroHey Ganitha,
You can do it with groovy i believe.
I can probably put the groovy together to update 1 test at a time - which wont really save you anytime (over using the embedded functionality) cos my groovy skills bite.
Perhaps ChrisAdams or nmrao can save the day?
On a related note, you state that more recent versions of ReadyAPI provides functionality to clone steps to multiple testcases. I didnt realise that. Ive looked in the help and i could find that in there. Could you post a link to where you saw this please? I had a quick look in help and played with the clone stel functionality, but i couldnt see how to do it on later versions.
Cheers,
Rich - ChrisAdamsChampion Level 3
Nice!
Related Content
- 4 years ago
Recent Discussions
- 19 hours ago