You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2019/06/24 19:31:42 UTC

[Bug 63527] New: HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

            Bug ID: 63527
           Summary: HTTP Request Defaults : "URLs must match" -->"URLs
                    Patterns to Include" + "URL Patterns to Exclude"
           Product: JMeter
           Version: 5.1.1
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: pierre.astruc@evertest.com
  Target Milestone: JMETER_5.2

Hello !

I'm using Jmeter to "retreive all embedded resouces" from some HTTP request,
and it's working pretty well :)

Actually, I can whiteliste domains with regex like:
(?i).*(static\.apache\.net|media\.apache\.net|www\.apache\.net).*

Or blacklist some domains with regex like:
^((?!facebook\.com|googleapis\.com|abtasty\.com).)*$

As enhancement, I would like to see instead of "URLs must match" something like
"HTTP(s) test Scrip Recorder", a way to declare URLs to keep, + a way to
declare URLs to remove.
For example, I'm testing some whitelisted URLs domains with some 404 URLs
pictures I would like to blacklist, and I can't seem to find a regex way to
perform that with current 5.1.1 engine.

Thanks for reading !
Cheers

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

--- Comment #3 from pierre.astruc@evertest.com ---
Awesome Felix, thanks again :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

--- Comment #7 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for testing and the feedback.

Could you test again with the next nightly (or trunk build)?

commit 445df9f387d23cf5b8defa7c3d257608bff7904b
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Thu Aug 13 12:49:06 2020 +0200

    Fix to: Implement a new setting to allow the exclusion of embedded URLs

    A logic mistake would make the exclude filter be only applied, when
    a include filter was defined.

    Bugzilla Id: 63527
    Relates to #607
---
 .../java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk
   Target Milestone|JMETER_5.2                  |JMETER_5.3.1
             Status|NEW                         |NEEDINFO
           Hardware|PC                          |All

--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
Hi Pierre, could you please test next nightly and report, if this is what you
wanted?

commit 0592978cb16ff8e7aea3ca96215e01141a78c2cd
AuthorDate: Sun Aug 2 15:25:18 2020 +0200

    Implement a new setting to allow the exclusion of embedded URLs

    At the moment we allow only one regular expression to control which URLs
will
    be downloaded by the HTTP sampler, when embedded download is enabled.

    This can be used to exclude specific URLs, but it is not possible to
exclude and allow
    URLs at the same time.

    This patch gives the user a second field which can be used to exclude URLs.

    Bugzilla Id: 63527
    Closes #607
---
 .../apache/jmeter/resources/messages.properties    |   1 +
 .../apache/jmeter/resources/messages_fr.properties |   1 +
 src/protocol/build.gradle.kts                      |   1 +
 .../protocol/http/config/gui/HttpDefaultsGui.java  |  62 +++++++++++++--------
 .../http/control/gui/HttpTestSampleGui.java        |  52 +++++++++--------
 .../protocol/http/sampler/HTTPSamplerBase.java     |  41 ++++++++++++--
 xdocs/changes.xml                                  |   1 +
 .../http-request-defaults-advanced-tab.png         | Bin 9455 -> 19213 bytes
 .../screenshots/http-request-advanced-tab.png      | Bin 6194 -> 18573 bytes
 xdocs/usermanual/component_reference.xml           |  22 ++++++--
 10 files changed, 123 insertions(+), 58 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

pierre.astruc@evertest.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from pierre.astruc@evertest.com ---
I'm still looking for a solution to whitelist + blacklist some domains into the
"retreive all embedded resouces" engine.
At the moment there is only one regex possible, so I can only whitelist or
blacklist the url I think, am I wrong ?

Thanks !

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

--- Comment #5 from pierre.astruc@evertest.com ---
Of course Felix, I will try & report :)
Thanks for the dev !

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Started an implementation at https://github.com/apache/jmeter/pull/607

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

--- Comment #6 from pierre.astruc@evertest.com ---
Created attachment 37391
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37391&action=edit
Test plan to reproduce the problem

Hello Felix,

I made first tests with nightly #53873bc.
I just have a simple GET to https://www.evertest.com (test plan attached)

test1:
- when I'm using the reg (?i).*\.(js|css) to "URLs must not match": it's not
working :(

test2:
- when I'm adding the reg (?i).*(evertest\.com).* to "URLs must match": it's
working ! (jmeter only download from evertest.com + exclude *.js + *.css)

So the engine seems good, but it should also accept only "URLs must not match"
info :)
At the moment, "URLs must not match" seems applied only when "URLs must match"
are also defined.

Cheers !

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebb@apache.org

--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
*** Bug 53848 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63527] HTTP Request Defaults : "URLs must match" -->"URLs Patterns to Include" + "URL Patterns to Exclude"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63527

pierre.astruc@evertest.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from pierre.astruc@evertest.com ---
Hi Felix,

This is perfect, both filters are now working as needed !
(5.3.1-snapshot-ba27712)
A big thanks for improving the Embedded Resources download manager :)
Issue closed.

Pierre

-- 
You are receiving this mail because:
You are the assignee for the bug.