Forum Discussion

BhuvanShanmugam's avatar
BhuvanShanmugam
Contributor
16 years ago

Empty data in XPath Match 'Test' operation

Hello,

I created a XPath Match Assertion from my test case response; I entered a non-matching data to check for. (The response had Retry, I wanted to compare with Success).

Clicking the Test button results in a screen with no data printed for the 'expected' and 'but was' prompts.

See attachments.

Is this a known issue? Defect? Or am i setting something incorrectly ?


note that this field is an Enumeration and I am comparing the 'string' representations of the enumeration.


Bhuvan.

4 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    hm.. can you show the xml of the response message you are asserting?

    regards!

    /Ole
    eviware.com
  • Ole,

    Here is the xml...


     

     
         
           
            12345
           
            Retry
            999
            false
         

     


    HTH,
    Bhuvan


    PS: On a related topic, Can you also let me know of documents on how to choose what mock response to send based on the XPath match of values from the request.

    I see Groovy can be quite powerful, but I need a quick fix simple solution for my choices.

    Thanks again.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    sorry for the delay. This is an issue with an incorrect error message being shown, but it still seems to work ok.. if you look in the list of assertions you should see a better error message (showing the actual expected and found values)..

    thanks for pointing out!

    regards,

    /Ole
    eviware.com
  • Ole,

    Could you please point be to docs for the following query.

    PS: On a related topic, Can you also let me know of documents on how to choose what mock response to send based on the XPath match of values from the request.

    I see Groovy can be quite powerful, but I need a quick fix simple solution for my choices.

    Thanks,
    Bhuvan.