Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
Summary: Parallel Download : Add CSS Parsing to extract links from CSS files
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 59033
Blocks:
  Show dependency tree
 
Reported: 2016-03-07 21:25 UTC by Philippe Mouawad
Modified: 2016-04-21 10:17 UTC (History)
1 user (show)



Attachments
Patch using ph-css CSS parser (7.99 KB, patch)
2016-03-25 23:22 UTC, Philippe Mouawad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2016-03-07 21:25:59 UTC
As part 2 following Bug 59033

In order to make parallel download more realistic we should add parsing of CSS files.

For example, if you try parallel download with Tomcat 8 Homepage:
- JMeter will download:
*http://localhost:8080/tomcat.png
*http://localhost:8080/tomcat.css

- Browser will add to those 5 coming from parsing of tomcat.css:
*http://localhost:8080/bg-nav.png
*http://localhost:8080/asf-logo.png
*http://localhost:8080/bg-upper.png
*http://localhost:8080/bg-button.png
*http://localhost:8080/bg-middle.png
Comment 1 Philippe Mouawad 2016-03-25 23:22:02 UTC
Created attachment 33705 [details]
Patch using ph-css CSS parser

Hello,
Find attached a patch implementing feature using ph-css under Apache 2.0 license.

My testing shows that for some CSS, parsing fails , I opened bug:
- https://github.com/phax/ph-css/issues/17

Although issue might be in CSS.

Some notes on Parser:
- For now it appears you have to fix a CSS version, which is a problem in our case
Comment 2 Philippe Mouawad 2016-03-27 17:03:58 UTC
Author: pmouawad
Date: Sun Mar 27 17:01:00 2016
New Revision: 1736773

URL: http://svn.apache.org/viewvc?rev=1736773&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
Bugzilla Id: 59140

Added:
    jmeter/trunk/licenses/bin/ph-commons-6.2.4.txt   (with props)
    jmeter/trunk/licenses/bin/ph-css-4.1.0.txt   (with props)
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java   (with props)
Modified:
    jmeter/trunk/bin/jmeter.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/xdocs/changes.xml


Author: pmouawad
Date: Sun Mar 27 17:02:03 2016
New Revision: 1736774

URL: http://svn.apache.org/viewvc?rev=1736774&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
svn:eol
Bugzilla Id: 59140

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java   (props changed)


Author: pmouawad
Date: Sun Mar 27 17:03:23 2016
New Revision: 1736777

URL: http://svn.apache.org/viewvc?rev=1736777&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
svn:eol
Bugzilla Id: 59140

Modified:
    jmeter/trunk/licenses/bin/ph-commons-6.2.4.txt   (props changed)
    jmeter/trunk/licenses/bin/ph-css-4.1.0.txt   (props changed)
Comment 3 Philippe Mouawad 2016-03-27 18:55:51 UTC
Author: pmouawad
Date: Sun Mar 27 18:55:03 2016
New Revision: 1736807

URL: http://svn.apache.org/viewvc?rev=1736807&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
Use Browser Compliant mode
Create internal class instead of inlined one
Bugzilla Id: 59140

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java
Comment 4 Philippe Mouawad 2016-04-20 20:11:06 UTC
Author: pmouawad
Date: Wed Apr 20 20:01:41 2016
New Revision: 1740187

URL: http://svn.apache.org/viewvc?rev=1740187&view=rev
Log:
Upgrade ph-css to 4.1.1 as it contains fixes we reported:
https://github.com/phax/ph-css/issues/17
https://github.com/phax/ph-css/issues/18
https://github.com/phax/ph-css/issues/19

Modified:
    jmeter/trunk/LICENSE
    jmeter/trunk/build.properties
    jmeter/trunk/eclipse.classpath
    jmeter/trunk/lib/   (props changed)
    jmeter/trunk/lib/aareadme.txt
    jmeter/trunk/res/maven/ApacheJMeter_parent.pom


Author: pmouawad
Date: Wed Apr 20 20:10:26 2016
New Revision: 1740188

URL: http://svn.apache.org/viewvc?rev=1740188&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
Stop extracting url, only fetch @import
Bugzilla Id: 59140

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java
Comment 5 UbikLoadPack support 2016-04-21 10:17:49 UTC
Author: pmouawad
Date: Thu Apr 21 10:17:23 2016
New Revision: 1740274

URL: http://svn.apache.org/viewvc?rev=1740274&view=rev
Log:
Bug 59140 - Parallel Download : Add CSS Parsing to extract links from CSS files
Ignore empty @import
Bugzilla Id: 59140

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java
Comment 6 The ASF infrastructure team 2022-09-24 20:38:03 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3886