|
Title: Empty data in XPath Match 'Test' operation Post by: BhuvanShanmugam on July 29, 2008, 03:28:12 pm 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. Title: Re: Empty data in XPath Match 'Test' operation Post by: omatzura on July 29, 2008, 11:05:14 pm Hi,
hm.. can you show the xml of the response message you are asserting? regards! /Ole eviware.com Title: Re: Empty data in XPath Match 'Test' operation Post by: BhuvanShanmugam on July 30, 2008, 02:52:49 pm Ole,
Here is the xml... <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tol="tollgrade:userManager"> <soapenv:Header/> <soapenv:Body> <tol:authenticateUserResponse> <!--type: string--> <tol:userId>12345</tol:userId> <!--type: ResponseType - enumeration: [Success,InvalidUserID,HangUp,Retry,PasswordNotAllowed,PasswordDoNotMatch,BadPasswordLength,BadSessionId]--> <tol:responseCode>Retry</tol:responseCode> <tol:sessionId>999</tol:sessionId> <tol:pwdUpdateRequired>false</tol:pwdUpdateRequired> </tol:authenticateUserResponse> </soapenv:Body> </soapenv:Envelope> 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. Title: Re: Empty data in XPath Match 'Test' operation Post by: omatzura on August 04, 2008, 12:27:56 pm 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 Title: Re: Empty data in XPath Match 'Test' operation Post by: BhuvanShanmugam on August 08, 2008, 11:38:06 am 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. |