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.
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 Regards, Ali -----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:22 PM To: JMeter Users List; [EMAIL PROTECTED] Subject: Re: XPath Assertion does not work for queries which result in boolean, numbers etc Have you seen this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=41253 If that is what you mean, then the code is in SVN and nightly builds. S. On 10/04/07, Ali Ranalvi <[EMAIL PROTECTED]> wrote: > Hi, > > > > Anyone think about extending the XPath Assertion to include XPath queries > which do not result in a NodeList. Eg: count(//*errors)=1. > > > > Currently this would return a TransformerException, because the call used is > XPathAPI.selectNodeList. > > > > Cheers, > > Ali > > > 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] 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]

