简体   繁体   English

使用Jmeter和WebDriver Sampler进行性能测试

[英]Performance testing using Jmeter and WebDriver Sampler

I am creating a performance test suite in jmeter with webdriver sampler. 我正在使用webdriver sampler在jmeter中创建一个性能测试套件。 I am able to do it but when I see the results(load time).It keeps changing every time I run the test for same URL (homepage). 我能够做到,但是当我看到结果(加载时间)时,每次我对相同的URL(主页)运行测试时,它都会不断变化。 How do I get accurate results? 如何获得准确的结果?

Performance testing using WebDriver Sampler is not what it is designed for. 使用WebDriver Sampler进行性能测试不是设计的目的。

As per WebDriver Sampler Tutorial 根据WebDriver Sampler教程

Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. 注意:本项目无意替换JMeter中包含的HTTP Samplers。 Rather it is meant to compliment them by measuring the end user load time. 而是通过测量最终用户的加载时间来补充它们。

and

The Web Driver Sampler is meant to be run in conjunction with a HTTP Sampler so that from the server's perspective, the load is production like. Web Driver Sampler旨在与HTTP Sampler一起运行,以便从服务器的角度来看,负载就像是生产。 At the same time, the web sampler will simulate the user experience of interacting with the website/webapp whilst the server is under load, hence measuring the real user's experience at the same time. 同时,Web采样器将模拟服务器负载时与网站/ webapp交互的用户体验,从而同时测量实际用户的体验。

So I would recommend the following approach: 因此,我建议采用以下方法:

  1. Develop your test using HTTP Request Samplers 使用HTTP请求采样器开发测试
  2. Follow recommendations from How to make JMeter behave more like a real browser guide 遵循如何使JMeter表现得更像真正的浏览器指南中的建议
  3. Add a separate Thread Group with 1 virtual user and put WebDriver Sampler in there to measure real-life user experience during load test . 添加一个具有1个虚拟用户的单独线程组,然后将WebDriver Sampler放入其中,以在负载测试期间测量实际用户体验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM