知识卡片
链式请求验证业务路径
端到端用例可以把登录响应的测试凭据带入创建请求,再读取 Location 并请求新资源,断言创建的数据与业务状态。让每一段失败给出操作与期望,避免只看到末端失败。[[用读回验证资源创建]]
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- The API prerelease checklist 21.3 Getting the API working · 查看原书依据
Strest is an open source tool (https://github.com/eykrehbein/strest). It consumes a YAML file that describes a series of API requests to make, and then it asserts that the responses are correct. What makes strest even more useful is it’s ability to chain requests
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第21章《The API prerelease checklist》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch21.htm,阅读块 58)
- 结论依据:原文的 Strest 示例从前一次响应取数据供后续请求使用。
- 原始内容:Strest is an open source tool (https://github.com/eykrehbein/strest). It consumes a YAML file that describes a series of API requests to make, and then it asserts that the responses are correct. What makes strest even more useful is it’s ability to chain requests