how to clone single test step to multiple testcases in Ready API version 2.8
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022
02:25 PM
04-13-2022
02:25 PM
how to clone single test step to multiple testcases in Ready API version 2.8
I have a test Step that needs to copied to all testcases in a suite. Clone TestStep allows me to copy to only 1 another testcase.
in this process, I have to clone teststep one by one to all testcases. this is time consuming as there are around 20- 30 testcases in a suite.
In documentation, I saw there is a way but I am not seeing that option in version 2.8.
Labels:
- Labels:
-
Function Tests
-
Test Setup
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022
04:42 AM
04-14-2022
04:42 AM
Hey @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
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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022
05:30 AM
04-14-2022
05:30 AM
@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
Karel@apimate.eu
https://apimate.eu
https://apimate.eu
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022
06:13 AM
04-14-2022
06:13 AM
Nice!
