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





--- Comment #5 from Sebb <s...@apache.org>  2009-07-30 01:49:24 PST ---
(In reply to comment #4)
> (In reply to comment #2)
> > I think there are two problems here:
> > 
> > 1) BSF 2.4.0 was coded against Jython 2.1. It seems that some later releases
> > are not compatible.
> 
> Do you plan to support Jython 2.5 (as well as include the latest version of
> BSF) in the next minor release of JMeter? 

Yes, will move to BSF 3.0 for the next release.

BSF 3.0/JSR-223 does not distinguish scripts and expressions; everything is an
expression returning an Object (might be null).

> Or perhaps sooner in some new nightly
> build (based on the priority of other bugs as well, of course)?

That will happen when the code has been added to SVN.

> > 2) Ambiguity over what constitutes an "eval" script in BSF.
> > 
> > If you use Jython 2.1, the sampler will work provided that the script is a
> > Jython expression, such as "5" or "6+7".
> 
> If I create a BSF sampler that's set to use Jython, then being restricted to
> only use a single JPython expression (as opposed to multiple JPython
> statements) is severely limiting. On the surface, it seems that a fix to 
> JMeter
> to enable complete integration with Jython would be low-hanging fruit and
> provide a lot of bang-for-the-buck, bringing the complete richness of Jython 
> to
> JMeter samplers. I'm not familiar with JMeter's code, so I could be totally
> off-base here on how much work is involved to fully support a "true" Jython
> script containing any number of statements (as can be done with a BeanShell
> sampler) rather than just supporting a single Python expression.

The problem is in BSF 2.4/Jython, not JMeter.
Having said that, there is code in JMeter to work-round a similar problem with
BSF 2.4/Jexl.

> I have a thought... So if instead of using a BeanShell Sampler I were to use a
> BSF Sampler that's set to BeanShell, then would I have the same limitation? 

No.

> ie,
> Would this sampler be restricted to a single BeanShell expression instead of
> being able to use multiple BeanShell statements? If that's the case, then 
> maybe
> what's needed is to create a separate JythonSampler (in addition to the
> BeanShellSampler and BSFSampler). 

No.

> Given that "The Grinder 3" load testing tool
> uses Jython, I think that having a new JythonSampler sampler in JMeter would
> make it easier to migrate Jython scripts between the JMeter and The Grinder,
> esp when the dev group uses The Grinder but the QA group uses JMeter.
> 
> Thoughts?
> 
> 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

Reply via email to