JMeter 是否使用 junit 采样器测量服务器响应?

Does JMeter measure server response using junit sampler?

我想使用 JMeter 将一些功能测试集成到性能测试中。如果我使用 JUnit 采样器和 运行 测试启动浏览器并在浏览器中执行一些操作(点击、输入文本),我将在 JMeter 侦听器中得到什么:响应时间包括浏览器速度或仅服务器时间没有浏览器执行的响应?

我在 JMeter 中做了什么: 当我添加 JUnit 采样器并打开我的测试的导出 jar 文件时,它 运行 - 测试像通常的网络驱动程序测试一样执行,浏览器启动并加载 UI 元素,输入文本和点击。加载元素会影响响应时间吗?

JMeter 将测量整个测试用例 的时间。如果它假定初始化、启动浏览器等——当然,所有这些都将被计算在内,包括页面加载/元素呈现所需的时间。

如果您需要将测试分成较小的块 - 考虑迁移到 WebDriver Sampler, if you choose groovy as the scripting language you will be able to re-use your existing Java code and have better control over what's going on, add sub-results for logical actions, group separate actions together using the Transaction Controller 并并行执行测试。