https://issues.apache.org/bugzilla/show_bug.cgi?id=47511
Summary: Jython Sampler Broken
Product: JMeter
Version: 2.3.3
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P1
Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: willmcqu...@yahoo.com
JMeter's BSF Sampler is broken when used with Jython.
Steps:
1) Drop the att'd jython-standalone-2.5.0.jar file into JMeter's lib dir (or
create one yourself from www.jython.org).
2) Create a new JMeter test plan
3) Add a ThreadGroup
4) Add a BSF Sampler under that ThreadGroup. In the Sampler, choose Scripting
language: jython. Then in the large text box at the bottom (under Script to
run), type:
print 7
5) Add a View Results Tree listener to the ThreadGroup
6) Run the test plan
7) In the View Results Tree, go to the Sampler result tab. Notice the error:
Sample Count: 1
Error Count: 1
Response code: 500
Response message: org.apache.bsf.BSFException: exception from Jython:
SyntaxError: (no viable alternative at input 'print', ('string', 1, 0,
'print 7\n'))
7) Now also add a BSF PreProcessor (to the same ThreadGroup) with Language:
jython and the big text box filled with:
print 8
8) Run the test plan. Notice that although the BSF Sampler failed, running
Jython in the BSF PreProcessor works fine. You'll see 8 printed in stdout.
Versions:
1) JMeter version = 2.3.4 (BugZilla dropdown menu doesn't have option for
2.3.4, so I had to choose 2.3.3)
2) Jython version = 2.5 (standalone jar)
Please help! :-)
Cheers,
Will
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org