返回圖像/ PNG的APIary調用的分揀測試失敗。是否有可能不檢查返回的圖像的內容,而只是有一個圖像不是空作爲響應?返回圖像的APIary調用的分揀測試/ PNG
這裏是我的測試的輸出:
[31mfail [39m: GET /imp-endpoint/api/V1/Resources?left_lower_lat=52.482780222078205&left_lower_lng=13.3154296875&right_upper_lng=13.359375&right_upper_lat=52.50953477032729&width=250&heigth=250 duration: 1176ms
[31mfail [39m: body: Real and expected data does not match.
[32mrequest [39m:
body:
headers:
accept: image/png
User-Agent: Dredd/0.3.7 (Linux 3.5.0-52-generic; ia32)
Authorization: Basic ZG1wOmRtcEAxMjM0
uri: /imp-endpoint/api/V1/Resources?left_lower_lat=52.482780222078205&left_lower_lng=13.3154296875&right_upper_lng=13.359375&right_upper_lat=52.50953477032729&width=250&heigth=250
method: GET
[31mexpected [39m:
headers:
content-type: image/png
body:
�PNG
statusCode: 200
[31mactual [39m:
statusCode: 200
headers:
x-powered-by: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle Corporation/1.7)
server: GlassFish Server Open Source Edition 3.1.2.2
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
content-type: image/png
content-length: 26572
date: Tue, 15 Jul 2014 09:00:26 GMT
body:
�PNG
IHDR � ?1g�IDATx^��
這種行爲似乎的Dredd已經改變,因爲這是書面。指定一個空的正文+正確的內容長度標題仍然會導致Dredd失敗。 Apiary測試網站中的錯誤消息顯示爲「真實和預期數據不匹配」。在「身體」上。 –