You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2008/02/21 19:18:05 UTC
DO NOT REPLY [Bug 44464] New: - if controller doesn't work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44464>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44464
Summary: if controller doesn't work
Product: JMeter
Version: 2.3.1
Platform: Other
OS/Version: Windows Server 2003
Status: NEW
Severity: major
Priority: P2
Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: ccooper@rsasecurity.com
I am trying to use the if controller to make sure a task only gets done when a
variable is true. I have a variable called success, and when it does not equal
"NULL" I want it to execute the stuff under the if controller, but the if
controller always returns false, no matter what I put in it. I tested it by
putting 2 == 2 in there to see if that would cause it to go in, same with just
true, 1, etc. and it never enters the if. I put my original statement into a
while controller and it works so I know it wasn't the syntax.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 44464] - if controller doesn't work
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44464>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44464
------- Additional Comments From ccooper@rsasecurity.com 2008-02-21 10:54 -------
2008/02/03 12:51:11 ERROR - jmeter.control.IfController: missing ; before
statement (<cmd>#1) org.mozilla.javascript.EvaluatorException: missing ; before
statement (<cmd>#1)
at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:98)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:85)
at org.mozilla.javascript.Parser.addError(Parser.java:126)
at org.mozilla.javascript.Parser.reportError(Parser.java:132)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1175)
at org.mozilla.javascript.Parser.statement(Parser.java:623)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at org.mozilla.javascript.Parser.parse(Parser.java:293)
at org.mozilla.javascript.Context.compileImpl(Context.java:2238)
at org.mozilla.javascript.Context.compileString(Context.java:1284)
at org.mozilla.javascript.Context.compileString(Context.java:1273)
at org.mozilla.javascript.Context.evaluateString(Context.java:1129)
at org.apache.jmeter.control.IfController.evaluateCondition(IfController.java:100)
at org.apache.jmeter.control.IfController.next(IfController.java:151)
at
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:130)
at org.apache.jmeter.control.GenericController.next(GenericController.java:100)
at org.apache.jmeter.control.LoopController.next(LoopController.java:91)
at
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:133)
at org.apache.jmeter.control.GenericController.next(GenericController.java:100)
at org.apache.jmeter.control.LoopController.next(LoopController.java:91)
at org.apache.jmeter.threads.ThreadGroup.next(ThreadGroup.java:123)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:248)
at java.lang.Thread.run(Thread.java:595)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 44464] - if controller doesn't work
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44464>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44464
------- Additional Comments From ccooper@rsasecurity.com 2008-02-21 10:51 -------
so I gather from this you are saying you are not allowed to use a jmeter
variable in the if statement? According to the component reference you can, my
statement is "${success}" == "NULL" and I've also tried without quotes around
the variable, there is no error, why doesn't 2 == 2 automatically return true?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 44464] - if controller doesn't work
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44464>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44464
sebb@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
------- Additional Comments From sebb@apache.org 2008-02-21 10:30 -------
The If Controller and While Controller use different syntax.
If needs raw javascript; While needs a function or variable reference.
Please provide the exact condition you have used in the controller, and check
jmeter.log for any error messages.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 44464] - if controller doesn't work
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44464>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44464
------- Additional Comments From sebb@apache.org 2008-02-21 11:14 -------
(In reply to comment #2)
> so I gather from this you are saying you are not allowed to use a jmeter
> variable in the if statement?
That's not what I meant; you can use a variable but when the variable contents
are interpolated, the result must be valid Javascript.
> According to the component reference you can, my
> statement is "${success}" == "NULL" and I've also tried without quotes around
> the variable, there is no error, why doesn't 2 == 2 automatically return true?
Probably because there are one or more spaces at the end. Rhino seems to be
picky about that.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org