简体   繁体   English

是否可以在空手道中为 WebUI 自动化执行性能测试?

[英]Is it possible to execute performance test in Karate for WebUI Automation?

I am developing WebUI automation tests using Karate 0.9.5.RC5 and it is working wonderfully.我正在使用 Karate 0.9.5.RC5 开发 WebUI 自动化测试,它运行良好。 Does anyone know how to execute performance testing in Karate for WebUI Automation tests?有谁知道如何在空手道中执行 WebUI 自动化测试的性能测试?

That's great to hear and thanks for the feedback.很高兴听到并感谢您的反馈。 To be honest, we have focused on API perf testing and UI functional test automation so far.老实说,到目前为止,我们一直专注于 API 性能测试和 UI 功能测试自动化。 Maybe you can help us by experimenting and sharing what you find.也许您可以通过试验和分享您的发现来帮助我们。

You must be aware of the Gatling integration for API performance testing.您必须了解用于 API 性能测试的Gatling 集成 So we have some pieces of the puzzle in place.所以我们有一些拼图。

So maybe a hybrid strategy is best:所以也许混合策略是最好的:

  • identify the API calls being made by the UI, in the future we would like to derive them automatically from the Chrome network / devtools识别 UI 进行的 API 调用,将来我们希望从 Chrome 网络 / devtools 自动派生它们
  • manually convert the API calls to Karate tests, note that the VS Code plugin has an option to import from cURL手动将 API 调用转换为空手道测试,注意 VS Code 插件有一个从 cURL 导入的选项
  • now you can convert the Karate tests to a performance test, and for most teams, this is sufficient现在你可以将空手道测试转换为性能测试,对于大多数团队来说,这已经足够了
  • if needed, you can add some Karate calls to load HTML and static resources to make the load profile more realistic如果需要,您可以添加一些空手道调用来加载 HTML 和静态资源,以使负载配置文件更逼真
  • finally, it may be possible to run a Karate UI test in parallel, just to measure "real user" experience and measure the HTML / JS load times etc on the browser side.最后,可以并行运行空手道 UI 测试,只是为了衡量“真实用户”体验并衡量浏览器端的 HTML/JS 加载时间等。 we don't have this in place yet, but it should be possible to get all the page timings and perf-stats from Chrome我们还没有这个功能,但应该可以从 Chrome 获取所有页面时间和性能统计信息
  • potentially you could look at spinning up multiple Chrome instances in parallel using Docker - but again, this is something yet to be explored可能您可以考虑使用 Docker 并行启动多个 Chrome 实例- 但同样,这还有待探索

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM