Forum Discussion
M_McDonald
14 years agoSuper Contributor
I am quite confused, I thought you were trying to compare a value at the project level with a value in the incoming request. If you are trying to get a value from a test step from within the Mock Service you need to reference it the same way you did the project property, something like:
If there is an easier way I would be glad to know it.
Also, you seem to be using the value 'a' in your comparison instead of the variable a. I think it should be
def request = mockOperation.mockService.project.getTestSuiteByName('MyTestSuite').getTestCaseByName('MyTestCase').getTestStepByName('GetVehicleDetailsRequest').testRequest.requestContent
def holder = groovyUtils.getXmlHolder(request)
If there is an easier way I would be glad to know it.
Also, you seem to be using the value 'a' in your comparison instead of the variable a. I think it should be
if (holder["//*:RegNo"]==a)