[英]Newman Docker error: unknown option `--url'
我發現該選項被創建為通過運行以下命令在 MAC 上運行帶有 docker 圖像和郵遞員集合的 newman
docker pull postman/newman_ubuntu1404
docker run -t postman/newman_ubuntu1404 --url="https://www.getpostman.com/collections/8a0c9bc08f062d12dcda"
在帶有郵遞員集合的圖像上運行 newman 時,將返回以下錯誤。
error: unknown option `--url'
Docker 版本為 Docker 版本 18.06.1-ce,構建 e68fc7a
這是支持的嗎?
我發現了這個github 問題,它說用run
替換--url=
:
docker run -t postman/newman_ubuntu1404 run "https://www.getpostman.com/collections/8a0c9bc08f062d12dcda"
它似乎工作...
docker run -t postman/newman_ubuntu1404 run "https://www.getpostman.com/collections/8a0c9bc08f062d12dcda"
newman: Newman v4 deprecates support for the v1 collection format
Use the Postman Native app to export collections in the v2 format
newman
newmanTest
→ GET with URL Params
GET http://httpbin.org/get?lol=true [200 OK, 542B, 339ms]
✓ Response contains params
→ POST with JSON body
POST http://httpbin.org/post [200 OK, 704B, 158ms]
✓ Check POST param in response
→ DELETE request
DELETE http://httpbin.org/delete [200 OK, 606B, 184ms]
✓ Status code is 200
→ PUT with form data
PUT http://httpbin.org/put [200 OK, 687B, 159ms]
✓ Test form data
┌─────────────────────────┬──────────┬──────────┐
│ │ executed │ failed │
├─────────────────────────┼──────────┼──────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ requests │ 4 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ test-scripts │ 4 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ prerequest-scripts │ 0 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ assertions │ 4 │ 0 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 1204ms │
├───────────────────────────────────────────────┤
│ total data received: 1.52KB (approx) │
├───────────────────────────────────────────────┤
│ average response time: 210ms │
└───────────────────────────────────────────────┘
問題中使用的 docker 映像現已過時,新的官方映像附帶了一個不使用“--url”的工作示例
碼頭工人拉郵遞員/紐曼
docker run -t postman/newman run " https://www.getpostman.com/collections/8a0c9bc08f062d12dcda "
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.