1.3postman+newman命令運(yùn)行

1、安裝newman,npm安裝可查看1.2
npm install newman --global
2、安裝完成可以用命令查看版本信息
newman --version
3、下載需要運(yùn)行的postman_collection.json,和postman_environment.json,postman_globals.json
4、

newman run 用戶集合腳本文件.json --environment 環(huán)境變量文件.json --iteration-data 外部csv數(shù)據(jù)文件.csv --globals 全局變量的json文件 --timeout-request 500(超時(shí)時(shí)間) --reporters html  --reporter-html-export 指定報(bào)告文件名.html

case1
如果執(zhí)行時(shí)報(bào)錯(cuò),需要安裝newman-reporter-html,執(zhí)行:nmp install -g newman-reporter-html


image.png

再次執(zhí)行


image.png
newman run D:\postman\巴士集團(tuán).postman_collection.json --environment D:\postman\正式環(huán)境.postman_environment.json --reporters html --reporter-html-export htmlOutput.html
執(zhí)行報(bào)告
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容