Is it possible to make Jmeter compatible with Xpath 2.0 for xpath extractor Objctive is to use regular expressions in the xpath syntax
Hello, Thanks for report. For now the issue seems to be that there is no open source implementation of XPath 2.0 AFAIK. Regards
Hello, It seems I didn't read correctly Saxon Homepage. It appears we may be able to use: http://saxon.sourceforge.net/#F9.7HE Mozilla Public License version 1.0 is compatible with ASF License as per : - https://www.apache.org/legal/resolved.html
Created attachment 35952 [details] Patch implementing feature Hello, UbikLoadPack Team is happy to contribute this enhancement to Apache JMeter developed by Thomas, Anthony and Philippe and sponsored by Ubik-Ingenierie. Here are the enhancements: - XPath 2 is now supported relying on SAXON9-HE under MPL 2 license - A new element has been created to avoid any backward compatibility constraint and to allow cleanup - A new View Results Tree Renderer has been also implemented - performances of this component should be significantly faster than old one as XPath Expression are now compiled and cached We are happy to donate this code to Apache JMeter as we have already donated other piece of code in the past under our signed CCLA. Regards UbikLoadPack Team @ubikloadpack https://ubikloadpack.com
Thank's a lot Philippe !
Author: pmouawad Date: Sun Jun 3 19:05:08 2018 New Revision: 1832784 URL: http://svn.apache.org/viewvc?rev=1832784&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Contributed by UbikLoadPack Bugzilla Id: 60991 Added: jmeter/trunk/licenses/bin/Saxon-HE-9.8.0-12.txt (with props) jmeter/trunk/src/components/org/apache/jmeter/extractor/XPath2Extractor.java (with props) jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/XPath2ExtractorGui.java (with props) jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXPath2.java (with props) jmeter/trunk/src/core/org/apache/jmeter/util/XPathQueryCacheLoader.java (with props) jmeter/trunk/test/resources/XPathUtilTestXml.xml (with props) jmeter/trunk/xdocs/images/screenshots/xpath2_extractor.png (with props) Modified: jmeter/trunk/LICENSE jmeter/trunk/bin/jmeter.properties jmeter/trunk/bin/saveservice.properties jmeter/trunk/build.properties jmeter/trunk/build.xml jmeter/trunk/eclipse.classpath jmeter/trunk/lib/ (props changed) jmeter/trunk/lib/aareadme.txt jmeter/trunk/res/maven/ApacheJMeter_parent.pom jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java jmeter/trunk/test/src/org/apache/jmeter/util/XPathUtilTest.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml jmeter/trunk/xdocs/usermanual/properties_reference.xml
Author: pmouawad Date: Sun Jun 3 19:13:06 2018 New Revision: 1832785 URL: http://svn.apache.org/viewvc?rev=1832785&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Fix failures on SaveService Bugzilla Id: 60991 Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Author: pmouawad Date: Sun Jun 3 19:29:35 2018 New Revision: 1832786 URL: http://svn.apache.org/viewvc?rev=1832786&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Fix failures on jars versions testing Bugzilla Id: 60991 Modified: jmeter/trunk/build.properties jmeter/trunk/build.xml jmeter/trunk/res/maven/ApacheJMeter_parent.pom jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java
*** Bug 60231 has been marked as a duplicate of this bug. ***
Author: pmouawad Date: Sun Jun 3 20:12:49 2018 New Revision: 1832787 URL: http://svn.apache.org/viewvc?rev=1832787&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Fix failures on import order Use isNotEmpty Ensure context is cleaned up on each call Bugzilla Id: 60991 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXPath2.java jmeter/trunk/src/core/org/apache/jmeter/util/XPathQueryCacheLoader.java jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
Author: pmouawad Date: Sun Jun 3 20:23:27 2018 New Revision: 1832788 URL: http://svn.apache.org/viewvc?rev=1832788&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Use SaxSource Bugzilla Id: 60991 Modified: jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
Tested throughput on attached Test Plan: 1 Thread: XPath: Generate Summary Results = 197891 in 00:01:00 = 3289.2/s Avg: 0 Min: 0 Max: 1 Err: 0 (0.00%) XPath 2: Generate Summary Results = 582350 in 00:01:00 = 9683.9/s Avg: 0 Min: 0 Max: 1 Err: 0 (0.00%) 5 Threads: XPath: Generate Summary Results = 602949 in 00:01:00 = 10014.3/s Avg: 0 Min: 0 Max: 1 Err: 0 (0.00%) XPath 2: Generate Summary Results = 2585773 in 00:01:00 = 43000.2/s Avg: 0 Min: 0 Max: 1 Err: 0 (0.00%) So throughput of new component is 3 to 4 times higher.
Author: pmouawad Date: Tue Jun 12 08:52:22 2018 New Revision: 1833387 URL: http://svn.apache.org/viewvc?rev=1833387&view=rev Log: Bug 60991 - XPath Extractor : Implement XPath 2.0 Update XPath2 Tester so that it's possible to use namespace aliases Bugzilla Id: 60991 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXPath2.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4361