是否有用于 REST 服务的性能和负载测试的工具?

发布于 2024-09-06 17:30:10 字数 1539 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

懵少女 2024-09-13 17:30:10

RESTful Web 应用程序/API 只是 HTTP,因此不需要专门的工具来测试性能(与功能测试相反,专门的工具可能会有所帮助)。您基本上只需要发出大量 HTTP 请求并记录结果。

与 JMeter 等更复杂的工具相比,我更喜欢 ApacheBench。它非常简单且易于编写脚本 — 只需编写一个 shell 脚本即可。我还发现它是面向 HTTP 的,而 JMeter 等工具旨在支持模拟人类使用模式。

https://httpd.apache.org/docs/current/programs/ab。 html

A RESTful web app/API is just HTTP, so no specialized tools are needed to test performance (as opposed to functional testing, where specialized tools could be helpful). You basically just need to make a lot of HTTP requests and record the results.

I prefer ApacheBench to more complex tools such as JMeter. It's very simple and easily scriptable — just write a shell script. I also find it oriented on HTTP, while tools like JMeter are designed to support simulating human usage patterns.

https://httpd.apache.org/docs/current/programs/ab.html

羅雙樹 2024-09-13 17:30:10

REST 服务应该很容易使用 jmeter 进行测试。

REST services should be easy to test with jmeter.

jJeQQOZ5 2024-09-13 17:30:10

正如我在评论中提到的,最好使用 siege 而不是 ab,因为它具有更多功能。但如果您需要更复杂的东西,请尝试 JMeter。对于 JMeter 分布式测试,您可以使用云中的 JMeter

As I mentioned in comment better use siege than ab as it has more functionality. But if you need something more complex try JMeter. For JMeter distributed testing you can use JMeter in cloud.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文