在 Jmeter 中是否有可能通过在浏览器中呈现页面来获得整体响应时间
Is it possible in Jmeter to get overall response time with including rendering of page in browser
我有客户的要求,对于所有 requests.Its 和 API 前端,总响应时间(端到端时间,包括在浏览器中呈现页面的时间)应该是 3 秒。
据我所知,jmeter 会处理服务器端响应时间,即使我添加了嵌入式资源,它也只会下载 java 脚本、图像等,但不会充当浏览器。有什么方法可以获得整体响应时间(端到端时间,包括在浏览器中呈现页面)。
有人可以帮我解决this.Thanks..
您不能,根据 JMeter project main 页面:
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).
因此,获得 client-side 指标(如渲染时间)的唯一方法是您需要使用真正的浏览器,例如使用 WebDriver Sampler. Metrics can be obtained from Navigation Timing API via WebDriver.executeScript() function
启动浏览器
您可以将 JMeter 插件 WebDriver Sampler 与关联的驱动程序配置元素结合使用,以实现整体响应时间。
以下链接可能有用
- Web Driver教程
- 网络驱动程序Sampler
我有客户的要求,对于所有 requests.Its 和 API 前端,总响应时间(端到端时间,包括在浏览器中呈现页面的时间)应该是 3 秒。
据我所知,jmeter 会处理服务器端响应时间,即使我添加了嵌入式资源,它也只会下载 java 脚本、图像等,但不会充当浏览器。有什么方法可以获得整体响应时间(端到端时间,包括在浏览器中呈现页面)。
有人可以帮我解决this.Thanks..
您不能,根据 JMeter project main 页面:
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).
因此,获得 client-side 指标(如渲染时间)的唯一方法是您需要使用真正的浏览器,例如使用 WebDriver Sampler. Metrics can be obtained from Navigation Timing API via WebDriver.executeScript() function
启动浏览器您可以将 JMeter 插件 WebDriver Sampler 与关联的驱动程序配置元素结合使用,以实现整体响应时间。
以下链接可能有用
- Web Driver教程
- 网络驱动程序Sampler