Done. ID: 42088. Ali
-----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 7:08 PM To: JMeter Users List; [EMAIL PROTECTED] Subject: Re: XPath Assertion does not work for queries which result in boolean, numbers etc On 11/04/07, Ali Ranalvi <[EMAIL PROTECTED]> wrote: > HI Sebb, > > Thanks for your reply. I had a look at the Issue#41253, yes that's similar > what I was suggesting. However in XPath Assertion, you are not merely > extracting but also matching. Duh - sorry, that was for a different XPath test element. > Current behaviour: The XPath query is assumed to return a NodeList *only*. > If the XPath query returns null or a list with no nodes, then all's well, > else it fails. > > If you try to assert count(//*errors)=1 (count of all error nodes wherever > they occur in the XML document must be 1), a valid XPath query, which > evaluates to a #BOOLEAN, there's a TransformerException. > > We need additional meat in XpathAssertion#getResult(SampleResult) to: > 1. Use generic XPathAPI.eval, instead of XPathAPI.selectNodeList > 2. Make decision based on the return value of point 1. > a. If NodeList, do as earlier. > b. If boolean, then fail if false, else pass. > c. So on for other types Can you create a Bugzilla enhancement for this please? It would be very helpful if you could also include some test samples - i.e. an XML document, and some Assertions that are expected to pass or fail. S/// --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

