首页 > 解决方案 > 我们可以使用 testCafe 自动化 API 吗?

问题描述

Caw 我们使用 testCafe 自动化 API 吗?我需要同时自动化 Web 和 API,我的意思是在 UI 上执行一些操作后,我需要测试相关的 API。

标签: apitestingautomated-testse2e-testingtestcafe

解决方案


我不确定我是否理解您的需求,但如果您想检查 api 请求的结果,我想您需要RequestLogger: 一个钩子,您可以在某些特定 api 的 url 上添加到您的测试中,然后在您的测试中将能够检查请求包含的内容。

此处的文档:https ://devexpress.github.io/testcafe/documentation/test-api/intercepting-http-requests/logging-http-requests.html


推荐阅读