Search code examples
performanceseleniumjmeterjunit4

Should I use JMeter With Selenium And junit for load and performance testing of Web applications?


I want to Use java code with selenium and junit into jmeter to tests application performance, because i guess that the record doesnt allow test visibility and maintainability!!!


Solution

  • It depends on 2 factors:

    1. What load you're trying to achieve (how many concurrent virtual users you need)
    2. What hardware do you have

    Looking for example into Firefox 72.0.2 system requirements:

    • 1 CPU core with support of SSE2 instructions per browser instance
    • 2 GB of RAM per browser instance

    It means that for Selenium test assuming 100 virtual users you will need 101 CPU cores and 200 gigabytes of RAM.

    The same load you can simulate using JMeter's HTTP Request samplers with a couple of CPU cores and gigabytes of RAM.

    So if you have access to unlimited hardware at no cost you can re-use your tests, but if you want to keep the load test footprint at minimum you should consider converting the tests. Just make sure to configure JMeter to behave like a real browser.