如何在 jmeter 中找到 API 的浏览器渲染时间,包括检索嵌入式资源是否给出了整体响应时间。?

How to find the Browser rendering time for API in jmeter ,does including retrieve embedded resource gives the overall response time.?

我必须对应用程序进行性能测试(它有 UI),它有 API 个请求,如何找到 APIs 的浏览器渲染时间,我们可以吗通过检索嵌入式资源来做到这一点。我对此很陌生,有人可以指导我吗?

根据 JMeter project main page

并非如此

JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).

测量浏览器呈现时间的唯一方法是使用真实的浏览器,如果您想将此与现有的 JMeter 性能测试一起进行 - 请选择 WebDriver Sampler, it provides JMeter integration with Selenium 浏览器自动化框架,这样您就可以启动关闭真实浏览器并测量其渲染时间(WebDriver Sampler 的响应时间将是从打开页面到渲染完成的时间。

如果您需要细分 - 考虑使用 Navigation Timing API