Forum Discussion

Ton636's avatar
Ton636
Contributor
14 years ago

XQuery bug - always returns true in 4.5, works in 4.0.1

Hi,

I am worried there is a serious bug in XQuery assertions, but I am hoping this is just some config thing I'm missing. I just noticed that one of our test cases passed, even though it should be failing (related to Google socialgraph being retired recently). I ran the exact same test with soapUI 4.0.1 and it failed the assertion as expected.

I have this XML returncode:

<socialgraph/>

And it passes this XQuery assertion:

count(socialgraph/confirmedMatch) > 0

With expected result:
<xml-fragment>true</xml-fragment>

Even though the result clearly is 'false'.

I was able to get it to work properly, by removing the xml tags from the expected result (it now fails the assertion) - but this is definitely different from 4.0.1. I can change those XML tags in the expected result to anything <BLAH>whatever</BLAH> and the assertion passes. The worst part is though, that if you use 'select from current' to prime the assertion as it were, it still puts in those xml-fragment tags around the true/false, but they make the assertion meaningless, it seems.

Am I just missing something basic here or is this indeed a serious bug? I'm concerned this invalidates a whole range of our tests.

7 Replies

  • Hello,

    We are currently looking into this, if you could help us with some sample project to reproduce this would great.

    robert
    /Smartbear
  • A sample project is tricky as of course I cant use anything of internal stuff... but I will try and reproduce it with some public webservice somewhere.
  • Hiya, any indication for an ETA? Im just wondering if I have to go and check/change most of my existing test cases, roll back to 4.0.1 or if I can afford to wait a little while longer.
  • Hello,

    Please upcoming nightly build. Fix for this issue will be available there. Let us know does this work for you.

    Thanks for patience,
    robert
    /Smartbear
  • Hey guys, sorry that I never got back - I had updated our assertions to work around the bug and then forgot about it. Until I got the #Bug tshirt in the mail Thanks! And also thanks for fixing this so quickly.