I have written Selenium Automation Test Scripts using Page Object Model. The scripts work well and no complaints there. I want to now do performance testing of the application and am planning to use Jmeter for the same.
Is there a way I can use the selenium scripts & jmeter together to do the performance testing.
My aim is to write the scripts only once (in Selenium) and reuse them for different purposes.
CodePudding user response:
Your solution is Webdriver plugin for JMeter
https://github.com/undera/jmeter-plugins-webdriver
Alternatively you can download the same from plugins manager as well
CodePudding user response:
I don't think you will be able to use Selenium for performance testing because it's generally not recommended as it doesn't make a lot of sense.
If you need details:
- You won't have metrics and KPIs which JMeter normally gives you if you're using HTTP Request sampler
- Browsers are very resource intensive, an instance of browser requires a CPU core and 2 GB of RAM (if not more) so with 8x CPU cores and 16 GB of RAM you will be able to kick off only 7 browser instances and if you will be using JMeter it will be thousands of virtual users because Java thread has much less resource footprint
Wouldn't it be better to convert your Selenium tests into "pure" JMeter instead?