如何使用 JMeter 测试单页应用程序的客户端性能测试
How to test client side performance testing of single page application with JMeter
JMeter 不支持开箱即用的客户端性能测试(验证内容呈现时间/页面加载时间)。
在单页应用程序中,请求作为 API 调用发送到服务器。我有兴趣使用 JMeter 验证并发用户的客户端页面加载时间。
使用 JMeter 测试 SPA 的最佳方法是什么?
-
有没有其他工具可以用来验证客户端
并发用户的负载测试?
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 用于纯前端操作是否有意义,很可能您正在寻找 browser developer tools or more sophisticated solutions like Lighthouse or WebPageTest
的 Performance
选项卡
关于WebDriver Sampler plugin, it just provides JMeter integration with Selenium browser automation framework so you will be able to launch a real browser per JMeter thread (virtual user) and the rest depends on your implementation, most probably you will want to query window.performance APIs values to get the metrics you're looking for via executeScript() function
JMeter 不支持开箱即用的客户端性能测试(验证内容呈现时间/页面加载时间)。
在单页应用程序中,请求作为 API 调用发送到服务器。我有兴趣使用 JMeter 验证并发用户的客户端页面加载时间。
使用 JMeter 测试 SPA 的最佳方法是什么?
有没有其他工具可以用来验证客户端 并发用户的负载测试?
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 用于纯前端操作是否有意义,很可能您正在寻找 browser developer tools or more sophisticated solutions like Lighthouse or WebPageTest
的Performance
选项卡
关于WebDriver Sampler plugin, it just provides JMeter integration with Selenium browser automation framework so you will be able to launch a real browser per JMeter thread (virtual user) and the rest depends on your implementation, most probably you will want to query window.performance APIs values to get the metrics you're looking for via executeScript() function