Forum Discussion

steveKubik's avatar
steveKubik
Occasional Contributor
8 years ago

Remove Specific Suit in SOAP UI from Command Prompt

Hi,

     I am trying to remove a particular suite  from the  soap ui from Command Prompt. Groovy script is located in SOAP UI. I am calling this script from command prompt. But I am getting array index out of bound Exception in the command Prompt. 

 

Below is my code:

import com.eviware.soapui.model.project.ProjectFactoryRegistry;
import com.eviware.soapui.impl.wsdl.WsdlProjectFactory ;
def workspace = context.testCase.testSuite.project.workspace;
log.info workspace
groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
projectPath = groovyUtils.projectPath+'ScenariosFrameworkUpdatedTestFinal.xml';
log.info projectPath
def testProject = (workspace==null) ? ProjectFactoryRegistry.getProjectFactory(WsdlProjectFactory.WSDL_TYPE).createNew(projectPath) : workspace.getProjectByName('Service_Golden_Scenarios') ;
if(!testProject.open && workspace!=null) workspace.openProject(testProject);
def genReportTS = testProject.testSuites['NewCustomerSuiteTest'];
context.getTestCase().getTestSuite().getProject().removeTestSuite(genReportTS)

 

Thanks

Steve

 

 

No RepliesBe the first to reply