使用newman執行介面測試用例
阿新 • • 發佈:2019-01-14
一、安裝Newman npm install -g newman 二、執行case newman run case生成的json檔案 三、引數 npm install -g newman
- -e <source>, --environment <source>
- -g <source>, --globals <source>
npm install -g newman-reporter-html
newman run Postman_API_test.postman_collection.json -d data.json -r html
一般常用以下命令
newman run 用例集json -e 環境變數json -g 全域性變數json
四、示例
1、設定environment環境 -e
執行以下命令
newman run test.postman_collection.json
-e test.postman_environment.json >d://error.log