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 2012/11/20 15:49:22 UTC

[Bug 54176] New: Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

https://issues.apache.org/bugzilla/show_bug.cgi?id=54176

            Bug ID: 54176
           Summary: Regular expression markers `\Q` `\E` doesn't work for
                    "Response Assertion" and "RE Extractor"
           Product: JMeter
           Version: 2.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: marek.ruszczak@comarch.pl
    Classification: Unclassified

Created attachment 29612
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29612&action=edit
Assertion doesnt work with \Q and \E

Main use-case: escape spatial (for regular expressions) characters from content
of variables (see stack overflow topic for details:
http://stackoverflow.com/q/13472646/1387438 .

"\Q" and "\E" marks doesn't work for "Response Assertion" and "Regular
Expression Extractor".
I'm inducing minimal test case showing the problem.

Run test plan included.
Go to "View Results Tree"
Select assertion (it is failed).
copy regular expression "google.time\Q()\E"
go to request select response
now test this regular expression and it will find match so it works in this
response!

"\Q" and "\E" can surround anything (not only regular expression special
characters) and problems always appears.

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

--- Comment #3 from Sebb <se...@apache.org> ---
The Regexp Tester uses the same Regex engine, i.e. Jakarta ORO.

I just tried using JMeter 2.8, and \Q and \E do *not* work.

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

--- Comment #2 from Marek <ma...@comarch.pl> ---
Ok. I missed this in documentation, but  I've found there:

    20.6 Testing Regular Expressions

        Since JMeter 2.4, the listener View Results Tree include a RegExp
Tester
        to test regular expressions directly on sampler response data.

As I wrote: this regular expression (containing \Q\E) works in "View Results
Tree", so there is definitely some incoherency how regular expressions works in
JMeter and that is why I threated this as a bug.

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

--- Comment #5 from Sebb <se...@apache.org> ---
I was using the Regexp Tester.

You were using the Search faciliry, which uses the Java regex engine.

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Milamber <mi...@apache.org> ---
Bugzilla isn't a support forum.

Please use the JMeter user mailing.

Tips: JMeter uses Jakarta ORO for his RegExp engine (not Java RegExp)
http://jmeter.apache.org/usermanual/regular_expressions.html

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
         Resolution|INVALID                     |---

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
I find this a little disturbing for users.
Shouldn't we either:
- Replace java regexp engine from search feature by oro
- Or replace oro by java engine regexp but this is an issue for existing Test
Plans

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

[Bug 54176] Regular expression markers `\Q` `\E` doesn't work for "Response Assertion" and "RE Extractor"

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

--- Comment #4 from Marek <ma...@comarch.pl> ---
Created attachment 29617
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29617&action=edit
Screenshot showing that \Q \E works in "View Results Tree"

Some magic happens or we are talking about different things, it works in my
"View Results Tree", see screenshot.

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