Summary: | Parallel Download : Rework Parser classes hierarchy to allow pluging parsers for different mime types | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Philippe Mouawad <p.mouawad> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | p.mouawad |
Priority: | P2 | Keywords: | PatchAvailable |
Version: | 2.13 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 59140 | ||
Attachments: | Part 1 of patch |
Description
Philippe Mouawad
2016-02-19 14:12:17 UTC
This should not be that complex to implement: We need to handle @Import and background(-image), parsing url() In terms of architecture, it is in fact nearly here as: 1/ we can use in fact HTMLParser implementation, maybe by the way rename it to ExternalResourcesParser. 2/ HTTPSamplerBase#parsersForType can be filled in with "text/css", new parser implementation Created attachment 33573 [details]
Part 1 of patch
Hello,
Find attached a patch that:
- Introduces new interfaces to make extraction of links more generic, not strictly HTML
- makes some cleanup in code
Pay attention to the fact that:
- static initializer in HttpSamplerBase does not defaults anymore for html, that's why in jmeter.properties, htmlParser.className and htmlParser.types are uncommented
- Junit test has slightly been changed
This is a breaking change but as we are releasing a 3.0, it should be OK.
Regards
Philippe
Hi, Can I commit this patch ? Thanks Author: pmouawad Date: Mon Mar 7 21:22:17 2016 New Revision: 1733983 URL: http://svn.apache.org/viewvc?rev=1733983&view=rev Log: Bug 59033 - Parallel Download : Rework Parser classes hierarchy to allow pluging parsers for different mime types Bugzilla Id: 59033 Added: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java (with props) jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LinkExtractorParseException.java (with props) jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LinkExtractorParser.java (with props) Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/bin/testfiles/jmeter-batch.properties jmeter/trunk/bin/testfiles/jmetertest.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParseError.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParseException.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JsoupBasedHtmlParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/RegexpHTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java jmeter/trunk/xdocs/changes.xml Date: Fri Mar 18 10:34:47 2016 New Revision: 1735568 URL: http://svn.apache.org/viewvc?rev=1735568&view=rev Log: Followup to r1733983: Rename private constants to uppercase letter words. Bugzilla Id: 59033 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java Date: Fri Mar 18 11:17:05 2016 New Revision: 1735574 URL: http://svn.apache.org/viewvc?rev=1735574&view=rev Log: Followup to r1733983 Ensure, that only one instance of a LinkExtractorParser gets cached, even if two threads are creating one at the same time. Bugzilla Id: 59033 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java Date: Fri Mar 18 11:17:05 2016 New Revision: 1735574 URL: http://svn.apache.org/viewvc?rev=1735574&view=rev Log: Followup to r1733983 Ensure, that only one instance of a LinkExtractorParser gets cached, even if two threads are creating one at the same time. Bugzilla Id: 59033 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3838 |