Search code examples
selenium-webdriverjmeterperformance-testing

Does JMeter interact with physical browser


I have customer's report that the upload file function on our web application doesn't work sometimes. We tested in house and it does't happen. So I used JMeter to perform Performance Test on the web application (simulating 1000 users to upload at the same time). My Manager said the Graph Resutls, as well as Summary Report from JMeter don't help much in this case to detect where the problem could be. He asks if JMeter can actually upload on the UI and we can see what happening.

As far as I know, JMeter is an Emulator after all, it couldn't interact with web browser the way Selenium WebDriver does (?!). Is there anyway to do Performace test of Upload button and we can actually see it on the WepApp? I hope my question makes sense.

Thanks


Solution

  • Browsers don't do any magic, they just send HTTP requests and render responses. JMeter can execute HTTP requests via its HTTP Request sampler so from the backend server point of view there is no difference whether file upload is being made by real browser or by JMeter.

    See How to make JMeter behave more like a real browser article to learn how to properly configure JMeter so your test would be more realistic.


    With regards to Graph Result and Summary Report - I don't think they tell the full story. I would suggest going for the following approach:

    1. Add Response Assertion to the file upload request which will explicitly check for upload success
    2. Start with 1 virtual user and gradually increase the load until errors start occurring.
    3. Generate HTML Reporting Dashboard and see how increasing load correlates with other metrics (response time, hits per second, errors per second, etc.)