Forum Discussion

sakthivel's avatar
7 years ago

Groovy Script to Create SOAP and JDBC Request in SOAP UI

Hello Welcome,


I am trying dynamically Groovy to create Test Suite->TestCases-> Test Steps(SOAP, JDBC) Using below example, I have created Test Suite-> TestCases. But I am not sure how to create SOAP Request and JDB Request using the Groovy Script.


import com.eviware.soapui.impl.wsdl.teststeps.registry.GroovyScriptStepFactory
suite = context.testCase.testSuite.project.addNewTestSuite("ali")
tc = suite.addNewTestCase("test case ali")
gs = tc.addTestStep( GroovyScriptStepFactory.GROOVY_TYPE, "ali's GroovyScript" )["script"].value = '\'hello world\')'

Right now, I have End point URL in my SOAP request. I am getting request from external drive by using

${=new File('Desktop\\Code\\flow\\customer\\${Excel - Values#newcustomer}\\${=context.testCase.getTestStepAt(context.getCurrentStepIndex())}.txt').getText('UTF-8')


I am looking Groovy script to create SOAP create with End point URL also by adding above script in my SOAP request . Also please give some example about JDBC request.

Would you please help me out of this?



No RepliesBe the first to reply