kishpalat
13 years agoNew Contributor
Copying soap request from a test request to another
Hi,
My objective is to create a new test request step on executing a soap request and copy the request xml from the original one to the newly created test request. I am able to create new test step, but i am not able to copy the request to the new test step. See below the code snippet I have tried.
I am getting groovy.lang.MissingMethodException for the above snippet. I guess I haven't set the request properly here. I couldn't find any proper example which chows how to copy request to another test step.I am new to groovy script So please help.
My objective is to create a new test request step on executing a soap request and copy the request xml from the original one to the newly created test request. I am able to create new test step, but i am not able to copy the request to the new test step. See below the code snippet I have tried.
.
WsdlTestStep testStep = testRunner.testCase.addTestStep(WsdlTestRequestStepFactory.REQUEST_TYPE,testCaseName);
def requestXML = context.expand( '${Reprice_Claim#Request}' )
RequestStepConfig requestStepConfig = RequestStepConfig.Factory.newInstance();
WsdlRequestConfig testRequestConfig = requestStepConfig.addNewRequest();
testRequestConfig.setName( testCaseName );
testRequestConfig.setRequest(requestXML)
testStep.setConfig( requestStepConfig );
I am getting groovy.lang.MissingMethodException for the above snippet. I guess I haven't set the request properly here. I couldn't find any proper example which chows how to copy request to another test step.I am new to groovy script So please help.