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" )
gs.properties["script"].value = 'log.info(\'hello world\')'
context.testCase.testSuite.project.save()
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()).operation.name}.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?
Thanks
Shathi