Jmeter-plugin does not have JavaScript as scripting language option

2,794 views
Skip to first unread message

Eunice Lok

unread,
Oct 28, 2020, 11:50:44 PM10/28/20
to jmeter-plugins
Hi, 
I recently installed Jmeter on Mac OS. 
While trying to set up a test plan with the Selenium Web Driver Sampler, I noticed that under scripting language option, there is no JavaScript. How do I add JavaScript to the scripting language?

I'm actually trying to capture the load time for navigating between pages. Googled about it and it seems to suggest to download the jmeter plugin, then add selenium web driver. Most of the tutorials seems to be written in JavaScript.

Do you guys have any suggestion on how to go about with it? Or there isn't a need to use the selenium web driver sampler but there is other way to do it in jmeter to capture the load times for navigating between pages?

Dmitri Tikhanski

unread,
Oct 29, 2020, 12:04:10 PM10/29/20
to jmeter-plugins
There is no way to add "javascript" language given underlying JRE doesn't support it. My expectation is that you're suffering from JEP 372 so you need to downgrade your Java version, minimal required version to run JMeter 5.3 is Java 8, maximum seems to be Java 14.

Just in case be aware that since JMeter 3.1 you should be using Groovy language for scripting mainly because Groovy has better performance comparing to other scripting engines so if you're just starting scripting - go for Groovy, otherwise you'll need to install one of the previous JRE versions. More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It

Eunice Lok

unread,
Oct 29, 2020, 9:44:50 PM10/29/20
to jmeter-plugins
Thanks Dmitri for answering this! :) This is really helpful and informative! Do you have suggestions on how best to record the time for navigating between pages? I tried using blazemeter but the results does not seem to be accurate.

Felix Schumacher

unread,
Nov 29, 2020, 1:35:08 PM11/29/20
to jmeter-plugins
Dmitri Tikhanski schrieb am Donnerstag, 29. Oktober 2020 um 17:04:10 UTC+1:
There is no way to add "javascript" language given underlying JRE doesn't support it. My expectation is that you're suffering from JEP 372 so you need to downgrade your Java version, minimal required version to run JMeter 5.3 is Java 8, maximum seems to be Java 14.
Well, actually there are now two options to get back Javascript support in JMeter with JDK 15 and higher. The first one is to install a newer Mozilla Rhino implementation toghether with a companion library that adds JSR2223 support. The other one (quite new) is to install the newly released OpenJDK Nashorn implementation (together with its dependencies) in the Java module path.

Both ways will be described in the upcoming JMeter 5.4 release notes (scroll down to the bottom).

But ...


Just in case be aware that since JMeter 3.1 you should be using Groovy language for scripting mainly because Groovy has better performance comparing to other scripting engines so if you're just starting scripting - go for Groovy, otherwise you'll need to install one of the previous JRE versions. More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It

... I think it will be better, if you look into using Groovy :)
Reply all
Reply to author
Forward
0 new messages