Forum Discussion

ivanzj's avatar
Regular Visitor
7 years ago

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"; ("Path to WSDLs:"); ("TestWSDL - $TestWSDL"); ("Path to testSuite:"); ("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


No RepliesBe the first to reply