Forum Discussion
skillsoft
16 years agoFrequent Contributor
Hi Ole,
The assertions that I create from the responses after this listener is applied are passing when they are created, but failing when I run them. have tried XPath Matches, existence with script, RegExp. It seems that is changing the response after the assertions are run. A typical error that I'm getting in the assertion:
XPathContains assertion failed for path [declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
//soapenv:Envelope[1]] : Exception:org.custommonkey.xmlunit.Diff
[different] Expected number of child nodes '3' but was '1' - comparing at /Envelope[1]/Body[1]/getSearchParamsResponse[1]/return[1] to at /Envelope[1]/Body[1]/getSearchParamsResponse[1]/return[1]
I've tried doing a script assertion and inserting a 10 second delay, but it didn't help. The weird thing is, when I create a new assertion, any previous assertions I have on that request appear to pass. I looked at the other listeners and tried a few, but no luck.
I am running into another issue as well, that I can't blindly change all the <> globally as some of the web service responses have these tags in attributes. I think I can figure out the that issue, but the first one is a show stopper.
Thanks,
Mary
The assertions that I create from the responses after this listener is applied are passing when they are created, but failing when I run them. have tried XPath Matches, existence with script, RegExp. It seems that is changing the response after the assertions are run. A typical error that I'm getting in the assertion:
XPathContains assertion failed for path [declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
//soapenv:Envelope[1]] : Exception:org.custommonkey.xmlunit.Diff
[different] Expected number of child nodes '3' but was '1' - comparing
I've tried doing a script assertion and inserting a 10 second delay, but it didn't help. The weird thing is, when I create a new assertion, any previous assertions I have on that request appear to pass. I looked at the other listeners and tried a few, but no luck.
I am running into another issue as well, that I can't blindly change all the <> globally as some of the web service responses have these tags in attributes. I think I can figure out the that issue, but the first one is a show stopper.
Thanks,
Mary
Related Content
- 11 years ago
Recent Discussions
- 10 days ago