作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
谁能帮我弄清楚这个 Dredd 测试失败的原因?我觉得不错:
fail: GET /device/2/battery duration: 260ms
fail: body: Real and expected data does not match.
request:
body:
headers:
User-Agent: Dredd/0.6.0 (Darwin 14.3.0; x64)
uri: /device/2/battery
method: GET
expected:
headers:
connection: Keep-Alive
content-length: 18
content-type: text/plain
body:
BATTERY REQ QUEUED
statusCode: 200
actual:
statusCode: 200
headers:
connection: Keep-Alive
content-length: 18
content-type: text/plain
date: Tue, 09 Jun 2015 19:01:59 GMT
body:
BATTERY REQ QUEUED
最佳答案
这些可疑错误通常是由预期或真实主体中的尾随换行符引起的。尝试使用 CLI API Blueprint parser 解析您的蓝图看看 Dredd 到底期望什么。
关于testing - 意外失败的 Gavel/Dredd 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30740667/
谁能帮我弄清楚这个 Dredd 测试失败的原因?我觉得不错: fail: GET /device/2/battery duration: 260ms fail: body: Real and expe
我是一名优秀的程序员,十分优秀!