Forum Discussion

Ravinandan's avatar
14 years ago

to clone a TestCase using groovy script

Hi,

i am trying to clone a testcase through groovy script. Below is the code which work fine

import com.eviware.soapui.impl.wsdl.actions.testcase.CloneTestCaseAction
def ca = new CloneTestCaseAction();
ca.perform(testCase,Object)

which called from testcase setup script window. But this piece of code would prompt the close test case form and i have to click okay to complete the cloning action. Is THERE any way to bypass the " ok" button click action. ?? Any alternative way of handling this through groovy scripting. ?
===============

One more way i tried is ...

import com.eviware.soapui.impl.wsdl.*;

import com.eviware.soapui.impl.wsdl.WsdlTestSuite;
def clone_ts= new WsdlTestSuite(project, com.eviware.soapui.config.TestSuiteConfig con );
def colned_tc= clone_ts.cloneTestCase(ts,"TestCase_2")

ts is the handler to test case.

the problem with this code is com.eviware.soapui.config.TestSuiteConfig is an abstract class. I could not find any method whos return type is com.eviware.soapui.config.TestSuiteConfig .

Can any one PLEASE help me out .. Its urgent. !!

1 Reply

  • how to clone the test case using groovy script?
    I need to clone test step,request,description using groovy script window.

    Pls help me ASAP:)