Forum Discussion

MikeDally's avatar
MikeDally
Contributor
10 years ago

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 gen...
  • rupert_anderson's avatar
    10 years ago

    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