Forum Discussion
For Example, this is my request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="http://urn:MEWSUserPref">
<soapenv:Header/>
<soapenv:Body>
<urn:HelloWorld>
<urn:in0>hello${#Project#timestamp}@test.fr</urn:in0>
</urn:HelloWorld>
</soapenv:Body>
</soapenv:Envelope>
In the assertion, i compare a parameter to the in0 request parameter
declare namespace ns1='http://urn:MEWSUserPref';
//detail[1]/ns1:MEServiceException[1]/ns1:in0[1]
${myTestCase#Request#declare namespace urn='http://urn:MEWSUserPref'; //urn:setFilterSettings[1]/urn:in0[1]}
With this method, everytime i launch the assertion, a new timestamp is generated, due to the dynamic parameter.
I need to check the parameter sent in the request so i used the RawRequest
${myTestCase#RawRequest#declare namespace urn='http://urn:MEWSUserPref'; //urn:setFilterSettings[1]/urn:in0[1]}
In this case, the parameter is always the same in the assertion.
The same problem appears with propertyTransfer steps. The Request option transfers the ${#Project#timestamp} instead of the timestamp generated in the request.
How can i check these cases without the rawRequest?
- AntonE8 years agoSmartBear Alumni (Retired)
Thank you for clarification, now I see the problem. I think this is a bug and Request property should have the value of the property, not a property expansion string, but we need to discuss this with the team.
However, I tried to use Request property in XPath and Groovy assertions and it seems to be expanded automatically, so assertions pass. I used property expansion string as an expected value, but assertions definitely expand it - you can check, just use wrong expected value and check the actual value in the error message). What type of assertion do you use? Where do you generate timestamp property?
- AMA8 years agoNew Contributor
Same problem here..
Can't use data via XPath from the raw request with version 1.8, We use this on serveral places property transfer, GetData in requests, ...
When will this be fixed and what do you suggest we do in the meantime with this know bug? Install the previous version?
Kind regards,
Arjan