Contributions
Remove Specific Suit in SOAP UI from Command Prompt
Hi, I am trying to remove a particular suite from thesoap 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 Steve794Views0likes0CommentsRe: Create SOAP Automation Project in Eclipse
Thank you for your reply and I am looking for SOAP Service Project. Sorry for the delay and i was away from work. I really need a help from you. Because I am able to achieve in SOAP UI. 1). Create a Project 2). Add the Test Suite. 3). Create Test Cases and Test Steps. 4). Run the Test Suite 5). Save the Project' To maintain a code in SOAP UI very difficult and i need to write some of the scripts using Object oriented. So I am thinking writing a code in Eclipse will be easier and object oriented. Also I need to write lot of test cases for the below approach. I am able to do that in SOAP UI that creates Project,Test Suite, Test Cases, Test Steps and Run the suite. Same I need to do in SOAP UI. Would you please give some example. The example that you provided looks for Rest Service. Thanks Steve1.7KViews0likes0Comments- 944Views0likes1Comment
Test Steps issue
Hi , I need to execute a particular Test Case Step(testCaseToExecute) from this code. When I tried below code I am getting error and Page is loading only. Would you please some one assist me on this. def project = workspace.createProject(projectName,new File("C:\\Temp\\" + projectName + ".xml")); WsdlInterfaceFactory.importWsdl(project, 'http://www.webservicex.com/globalweather.asmx?WSDL', true) def suite = project.addNewTestSuite("TestSuite") tc = suite.addNewTestCase("TestCase") groovyScript= tc.addTestStep( GroovyScriptStepFactory.GROOVY_TYPE, "testCaseToExecute" ) def operation = project.getInterfaceAt(0).getOperationList()[0] def factory = new WsdlTestRequestStepFactory() config = factory.createConfig(operation,"SOAPRequest") testStep = tc.addTestStep(config) def project = testRunner.testCase.testSuite.project testRunner.runTestStep( project.testSuites['TestSuite'].testCases['TestCase'].testSteps['getTestCasesToExecute'] ) Regards, Steve1KViews0likes2CommentsCreate SOAP Automation Project in Eclipse
Hi All, I would need an idea can we able to create a Project/Suite/Test Cases/Test Steps in Groovy Code in Eclipse. I am new to Groovy and learner. If some one helps me that would be great help for me. I will contribute this community once as much i can . some one please help me . If possible Do you have any samples/Examples? My requirement is : 1) Project Creation. 2) Test Suites 3) Test Cases. 4) Test Steps 5) Run the Test Steps. Thanks Steve1.8KViews0likes2CommentsSOAP Request issue in Groovy Script
Hi All, I am getting error while I creating SOAP request by using below script. Looks something I was missing and Could someone assist on this. Error: groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep.addTestStep() is applicable for argument types: (com.eviware.soapui.config.impl.TestStepConfigImpl) values: [ GlobalWeatherSoap GetCitiesByCountry UTF-8 http://www.webservicex.com/globalweather.asmx ? ]]> ] error at line: 32 Code: WsdlInterfaceFactory.importWsdl(project, 'http://www.webservicex.com/globalweather.asmx?WSDL', true) def operation = testRunner.testCase.testSuite.project.getInterfaceAt(0).getOperationList()[0] def factory = new WsdlTestRequestStepFactory() def arr = ["CUS","ARO","RSS","VEO"] for(def x : arr){ log.info "For each Loop" + operation; config = factory.createConfig(operation,x) testStep = ts.addTestStep(config) testStep.properties['Request'].value = '<request>someData</request>' } context.testCase.testSuite.project.save() Any help is appreciated. Please903Views0likes1CommentRe: Groovy Script to Create Multiple SOAP Request
Hi, Thanks for your reply, but I am getting error in my code : Looks I am missing something in my code. Please help me on this. I am struggling lot on this. 1. Create a Project->Test Suite->Test Case->Properties Files-> I am able to create till this level but I am getting error when I create SOAP request. import com.eviware.soapui.impl.wsdl.* import com.eviware.soapui.impl.WsdlInterfaceFactory import com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestRequestStepFactory import com.eviware.soapui.impl.wsdl.teststeps.registry.GroovyScriptStepFactory import com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestRequestStepFactory import com.eviware.soapui.impl.wsdl.teststeps.registry.GroovyScriptStepFactory import com.eviware.soapui.impl.wsdl.* import com.eviware.soapui.impl.WsdlInterfaceFactory String projectName = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" def workspace = testRunner.testCase.testSuite.project.workspace def project = workspace.createProject('Project33333',new File("C:\\Temp\\" + projectName + ".xml")); WsdlInterfaceFactory.importWsdl(project, 'http://www.webservicex.com/globalweather.asmx?WSDL', true) def suite = project.addNewTestSuite("CustomerSuite") tc = suite.addNewTestCase("CustomerTestCases") ts = tc.addTestStep( 'properties', 'Excel-Values' ) ts.setPropertyValue( 'PropertyName', 'value' ) def operation = testRunner.testCase.testSuite.project.getInterfaceAt(0).getOperationList()[0] def factory = new WsdlTestRequestStepFactory() def arr = ["PEO","USC","USCS","ASC"] for(def x : arr){ log.info "For each Loop" + operation; config = factory.createConfig(operation,x) //log.info "Config:::" + config; testStep = ts.addTestStep(config) testStep.properties['Request'].value = '<request>someData</request>' } context.testCase.testSuite.project.save()3.3KViews0likes1Comment