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/04/25 12:42:04 UTC

DO NOT REPLY [Bug 53145] New: REE variable is not resolved inside function __intSum

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

             Bug #: 53145
           Summary: REE variable is not resolved inside function __intSum
           Product: JMeter
           Version: 2.5.1
          Platform: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Main
        AssignedTo: issues@jmeter.apache.org
        ReportedBy: pauljerald@gmail.com
    Classification: Unclassified


Created attachment 28676
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28676
jmx script file which explains the bug in simple manner

i tried with defining two variables test1 and test2 with values 10 and 20
respectively using user defined variables. both variables are used inside the
function __intSum and the variables used are resolved and expression is
executed with out any error. But if i use the variable created using regular
expression extractor, it is not resolved and it throws NumberFormatException in
jmeter logs.

I have attached a sample jmx scrript file which sends a GET request to
google.com and then extracts a number from its image file name using REE and
assigning that value to variable test3. This variable test3 is not resolved
inside the function __intSum and it throws NumberFormatException.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 53145] HTTP Sampler - function in path evaluated too early

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

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|REE variable is not         |HTTP Sampler - function in
                   |resolved inside function    |path evaluated too early
                   |__intSum                    |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 53145] HTTP Sampler - function in path evaluated too early

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

Sebb <se...@apache.org> changed:

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

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 53145] HTTP Sampler - function in path evaluated too early

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

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.5.1                       |2.6
           Severity|blocker                     |normal

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 53145] HTTP Sampler - function in path evaluated too early

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

--- Comment #2 from Sebb <se...@apache.org> 2012-04-25 12:27:02 UTC ---
URL: http://svn.apache.org/viewvc?rev=1330236&view=rev
Log:
Bug 53145 - HTTP Sampler - function in path evaluated too early

Modified:
  
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
   jmeter/trunk/xdocs/changes.xml


Tidied up code so it only extracts the property value if it's a StringProperty.
Previously the debug statements were executing the function as part of building
their string parameters.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 53145] REE variable is not resolved inside function __intSum

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

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from Sebb <se...@apache.org> 2012-04-25 11:59:18 UTC ---
The problem is that the function is being evaluated before the variable has
been defined.

Use the test plan toe initialise test3 as a valid number (e.g. 1) and the test
will then work.

However, this does point to a possible bug in JMeter - I'm not yet sure why the
function is being executed at test startup. If it's necessary to do so, the
code could perhaps be more tolerant of the error.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.