selenium-webdriverjmeterperformance-testing

JMETER | Selenium WebDriver | Multiple threads are not running properly


I am trying to run for 5 - 10 users using WebDriver Sampler in JMeter. I have configured Chrome Driver and provided WebDriver Sampler for code. When I am running for 1 user, it is running perfectly fine. But for multiple users, test is failing at some point where it is unable to locate some dropdowns. Only 1 thread is passed and others are getting failed. Is there any way to run for multiple threads in background?

Structure of JMeter configuration

I have tried WebDriver Sampler for 5 - 10 users. It is passing for 1. Expecting the same behavior for other threads as well. Else, how to run the same code in Headless.


Solution

  • Don't use Selenium for performance testing.

    Quote from Selenium website:

    Performance testing using Selenium and WebDriver is generally not advised. Not because it is incapable, but because it is not optimised for the job and you are unlikely to get good results.

    Quote from JMeter Plugins website:

    Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.

    So instead of trying to resolve your issue with multiple browsers I would rather recommend switching to HTTP protocol and configure JMeter to behave like a real browser


    With regards to your questions itself: