1.首先下載安裝node.js
命令行查看電腦版本(uname -a)去官網(wǎng)下載node.js
官網(wǎng)地址:https://nodejs.org/en/download/
安裝完成愉老,驗(yàn)證 node.js 是否安裝成功!
npm -v
2 安裝newman (前提:確保 npm -v 驗(yàn)證通過)
網(wǎng)速慢的小盆友,不要妄想 wifi 能幫你裝上!老老實(shí)實(shí)插根兒網(wǎng)線吧!
npm install -g newman
安裝完成俊扳,驗(yàn)證 newman 是否安裝成功!
newman -v
3 安裝newman-reporter-html
安裝命令:npm install -g newman-reporter-html
檢測時(shí)用(newman run 導(dǎo)出數(shù)據(jù).json -r html --reporter-html-export 生成測試報(bào)告名稱.html)