ivanzj
7 years agoRegular Visitor
Groovy: Import testsuite groovy testrunner.bat
I am trying to fully automate creation of project using simple groovy script.
I have managed to create new project, import wsdl, but i am stuck with import of testsuite.
Testsuite was exported from another project and all I have to do is to import it to new project. Using soapUI gui is not an option.
This is what i have so far"
import com.eviware.soapui.impl.wsdl.* import com.eviware.soapui.impl.WsdlInterfaceFactory String ProjectName = "D:/work/Project/testProject.xml"; String TestWSDL = "D:/work/WSDL/AWSECommerceService.wsdl"; String tstTestSuite = "D:/work/testSuites/suite.xml"; log.info ("Path to WSDLs:"); log.info ("TestWSDL - $TestWSDL"); log.info ("Path to testSuite:"); log.info ("TestWSDL - $tstTestSuite"); def currentProject = testRunner.testCase.testSuite.project; WsdlProject project = new WsdlProject(); WsdlInterface iface1 = WsdlInterfaceFactory.importWsdl(project,TestWSDL, true )[0] //Import of testsuite should go here project.saveAs(ProjectName);
thanks