使用 JMeter 捕获用于压力测试的模拟 React 应用程序

Capture simulated React aplication for Stress Test with JMeter

我需要记录一个应用程序的使用情况以进行压力测试。它是在 React Native 上编码的应用程序,我正在模拟 iOS phone 以使用 JMeter 记录功能。

我曾经使用 Chrome 录制 Web 和 HTML5 应用程序。 iOS模拟器有什么办法可以抓取吗?

谢谢,祝新年快乐:)

“应用的使用情况”是什么意思?

如果您需要监控特定于应用程序的指标,例如 CPU、内存、网络、电池使用情况等 - 您将无法使用 JMeter 执行此操作,请查看 Instruments 应用程序及其性能分析 iOS 应用程序。

使用 JMeter,您可以模拟 hundreds/thousands 个并发设备同时访问 backend server or the database, if this is what you're looking for - you can record the application network footprint using JMeter's HTTP(S) Test Script Recorder。只需确保将 JMeter 的自签名证书安装到您的设备(或模拟器)上,该文件名为 ApacheJMeterTemporaryRootCA.crt,当您启动 HTTP(S) 测试脚本记录器时,它会在 JMeter 的“bin”文件夹中生成。

您还需要enable full trust for the JMeter's certificate, see Configure Apple Devices for Proxy Recording指南了解更多详情。

一旦你记录了测试场景“骨架”,你应该能够在 correlating 动态参数和执行必要的参数化之后增加用户数量来重播它。