How do I clone an existing Groovy test step and insert it into another test case?
Hi there,
I want to dynamically build a SoapUI test structure so that my team can significantly reduce their prep time and get straight into testing. In one of my previous posts I was able to generate test cases and insert rest requests.
I want to also add in a groovy step for each of my test cases, which will handle the generation of test data.
Can anyone please advise on how I copy existing Groovy steps and put them into a target test case?
Hi Mike,
Where you say clone a Groovy TestStep, following on from your excellent work before, would it be acceptable to your needs to rather than clone, create new Groovy TestSteps for each of your scripted TestCases?
What I mean is say you had a TestCase object testCase, then what do you think about doing something like:
testCase.addTestStep("groovy", "HelloGroovy").setScript("log.info 'Hello!'")
?
That way you could effectively script in all the Groovy steps you need and supply custom scripts if necessary.
Cheers,
Rup