Forum Discussion

InterContinenta_1's avatar
InterContinenta_1
Occasional Contributor
11 years ago

[Res] Failed Xpath Assertion is Not showing complete XPath

I am using SOAP UI Pro 4.6.2

I have an Xpath Assertion for Match as shown in the Attached Image.

The Assertion is //ns1:OTA_HotelAvailRS[1]/ns1:POS[1]/ns1:Source[1]/@TerminalID and the Expected Content is DDDYDD

The above assertion is failed as the value from xml response is different than the expected.

The message it shows in SoapUI TestStep is

Match Content of [@TerminalID] FAILED
XPath Contains Comparison Failed, expecting [DDDYDD] actual was [5FBC4A]



Desired is to Print the whole Xpath which includes //ns1:OTA_HotelAvailRS[1]/ns1:POS[1]/ns1:Source[1]/@TerminalID


Please look at the Image attached to this post.

7 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Currently the XPATH is printed out when it is unreachable, i.e the path does not exist. For it to print out when the assertion fails and the path is found that would have to be an enhancement request.



    Regards,
    Marcus
    SmartBear Support
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Yes, I will write an enhancement request for this. I am currently looking at a workaround to get this done.



    Regards,
    Marcus
    SmartBear Support
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I have created SOAP-1155 as an enhancement request for this.





    Regards,
    Marcus
    SmartBear Support
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    In another Pro forum post requesting the same thing with XPATH assertion (viewtopic.php?f=2&t=22362) Prakash (one of our SoapUI developers) said that this will be fixed in the next minor release.




    Regards,
    Marcus
    SmartBear Support
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    This enhancement request is now in SoapUI Pro 4.6.3.




    Regards,
    Marcus
    SmartBear Support