Created attachment 28676 [details] 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.
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.
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.