Forum Discussion

pradeepbishnoi's avatar
pradeepbishnoi
Contributor
14 years ago

Error with wsdl.teststeps.WsdlTestRequest constructor call

Hi,

I am using the below set of code lines to get the RawRequest data of any teststep to store in a file and recvd the following error message :
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep (com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep)

import com.eviware.soapui.impl.wsdl.WsdlProject
import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep

def project = context.testCase.testSuite.project
log.info(project)
def testSuite = project.getTestSuiteAt(0)
log.info(testSuite)
def testCase = testSuite.getTestCaseAt(0)
log.info(testCase)
def testStep = testCase.getTestStepAt(0)
log.info(testStep)
def rawRequest = new WsdlTestRequestStep(project.getTestSuiteAt(0).getTestCaseAt(0).getTestStepAt(0))
log.info(rawRequest.getRawRequestData())


The idea is to put the above code into a loop (count = total number of test steps) and store the rawrequest & response into a file. Everything is working except the rawrequest. I works on using the other way :
def holderRawReq = groovyUtils.getXmlHolder ("TestStepName#RawRequest")

However, this is not working when used inside a loop. i.e., on passing the teststep name using some variable appended with "rawrequest".

def teststepname = testCase.getTestStepAt(it).getName().toString() // this will get the current teststep name
def inputHolder = teststepname + "#RawRequest"
def holderRawReq = groovyUtils.getXmlHolder (inputHolder)

Any inputs?

Thanks & Best Regards
~~ Pradeep Bishnoi ~~
No RepliesBe the first to reply