JavaScript in JSR223 Post Processor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JavaScript in JSR223 Post Processor

Beth Schrag
Hello,
I am wondering if anyone else has JavaScript code in JSR223 Post Processors that no longer run because the JS engine was removed from the latest version of Java.

I have quite a bit of complicated JS code that I would rather not have to rewrite and so had to downgrade to Java 8 in order for my JMeter scripts to work again.

Is there another way to get access to a JS engine in JMeter?
I am not new to JMeter but am to JavaScript and this JS code has been there for a long time (before me).
Is there any plan to provide something in future versions of JMeter?
What are other people doing to make this work?
Thanks for any help that is available.
Beth
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript in JSR223 Post Processor

Pieraś
What about open java?

pon., 16 lis 2020, 18:42 użytkownik Beth Schrag <[hidden email]>
napisał:

> Hello,
> I am wondering if anyone else has JavaScript code in JSR223 Post
> Processors that no longer run because the JS engine was removed from the
> latest version of Java.
>
> I have quite a bit of complicated JS code that I would rather not have to
> rewrite and so had to downgrade to Java 8 in order for my JMeter scripts to
> work again.
>
> Is there another way to get access to a JS engine in JMeter?
> I am not new to JMeter but am to JavaScript and this JS code has been
> there for a long time (before me).
> Is there any plan to provide something in future versions of JMeter?
> What are other people doing to make this work?
> Thanks for any help that is available.
> Beth
>
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript in JSR223 Post Processor

Vladimir Sitnikov
In reply to this post by Beth Schrag
Hi,

I see the following options:
a) Add support for GraalJS to JMeter. GraalJS is a standalone library that
evaluates JavaScript (of course, it works faster with GraalJS JIT compiler,
however it should work with any JVM)
b) Use Nashorn as a standalone library. It looks like there are people
willing to support Nashorn.
See https://twitter.com/lagergren/status/1315647553464082435 and the
relevant mail thread.
It is hard to predict when Nashorn would be available as a library,
however, it looks like it will happen sometime soon.
c) Use Java 8 or 11 which still includes Nashorn
d) Use Rhino JS engine

Vladimir
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript in JSR223 Post Processor

Felix Schumacher

Am 16.11.20 um 18:57 schrieb Vladimir Sitnikov:

> Hi,
>
> I see the following options:
> a) Add support for GraalJS to JMeter. GraalJS is a standalone library that
> evaluates JavaScript (of course, it works faster with GraalJS JIT compiler,
> however it should work with any JVM)
> b) Use Nashorn as a standalone library. It looks like there are people
> willing to support Nashorn.
> See https://twitter.com/lagergren/status/1315647553464082435 and the
> relevant mail thread.
> It is hard to predict when Nashorn would be available as a library,
> however, it looks like it will happen sometime soon.
> c) Use Java 8 or 11 which still includes Nashorn
> d) Use Rhino JS engine

I am preparing a patch to update the Mozilla Rhino implementation in
JMeter to the current one (1.7.13) and add a note on how to enable Rhino
to act as a JSR-223 engine (copy the rhino-engine-1.7.13.jar to  lib/ext).

Maybe the OP would like to test this (replace rhino-1.7.12.jar with
rhino-1.7.13.jar (located in lib/) and add rhino-engine-1.7.13.jar. See
https://github.com/mozilla/rhino/releases/tag/Rhino1_7_13_Release)

Felix

>
> Vladimir
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]