知识卡片
契约工具默认用例有边界
规范驱动测试工具的默认用例可能侧重正常路径。若规范包含无效输入、权限或状态转换场景,还要补负向用例与业务断言;工具报告全绿只证明已执行的检查通过,不能推断所有 API 行为正确。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 12 章《Testing and validating APIs》(源文件:_epub-src/OEBPS/Text/12.htm)
- 结论依据:原文指出 Dredd 默认正常路径覆盖有限,建议补充更广的输入测试。
- 原始内容:Dredd only tests the happy path of each endpoint. For example, to test the POST /orders endpoint, Dredd sends only a valid payload to the endpoint and expects it to be processed correctly.