1. 程式人生 > >postman—筆記3.Collections/資料引數化/測試報告

postman—筆記3.Collections/資料引數化/測試報告

Collections

儲存:

資料引數化:

執行前可以進行預覽:

csv檔案寫法:

測試報告:

一.需要安裝:

            1.nodejs

            2.npm→cnpm

            3.newman   :cnpm install -g newman

                                               注:用newman -h 檢測是否安裝成功

二.匯出指令碼

三.生成測試報告

newman run F:\api\test1.postman_collection.json -d F:\api\data.csv -r html,cli,json,junit

#F:\api\test1.postman_collection.json 為指令碼的路徑
#-d F:\api\data.csv   為資料的路徑
#-r html,cli,json,junit 為測試報告的格式

注:測試報告生的位置,如未設定的話一般在預設位置