0

I was checking how i can use existing selenium scripts written in python for JMeter. There are suggestions to use Jython. i have installed jython by putting jython jar file in lib. Using JSR223 Sampler, when I tried to give the existing selenium script file it is giving me below error while hitting run

> Data type ("text"|"bin"|""):text Response code:500 Response
> message:javax.script.ScriptException: ImportError: No module named  selenium in <script> at line number 1

Do i need to use third party tool to convert existing scripts to JMX file?

My second question is :- I checked the documentation and found that it works on python2.7 version. Is that really correct? How come it is not updated to python3

1 Answers1

1

No module named selenium in

It looks like you didn't install selenium module, you need to install it in order to be able to use it like:

 jython -m pip install selenium

More information: How can I install various Python libraries in Jython?

However if you want to use existing Python UI tests for performance testing it's better to consider converting them to JMeter's HTTP Request samplers, as each thread (virtual user) needs to run a real browser and a real browser needs 1 CPU core and a couple of gigabytes of RAM so you can simulate thousands of users on HTTP protocol level using the hardware allowing to launch several browsers only.

See How to Convert Selenium Scripts into the JMX Converter article for more details.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133