学习:接口测试-newman+jekins+postman

postman为接口而生,newman为postman而生

运行命令:newman run

常用参数:

-e 使用环境变量

-g 使用全局变量

-d 使用csv,json数据驱动

-n 循环次数

-r cli,html,junit --reporter-html-export  生成html报告

应用步骤  非GUI的方式运行

  1. 导出用例,环境变量,全局变量,数据文件  json格式
  2. 运行
  3. newman run “用例目录” -e "环境变量目录"-g"全局变量目录" -r cli.html.json.junit--reporter-html-export"指定一个生成路径"

postman+newman+jekins 持续集成

jekins新建任务 

输入命令

  1. newman run “用例目录” -e "环境变量目录"-g"全局变量目录" -r cli.html.json.junit--reporter-html-export"指定一个生成路径"
posted @ 2022-03-02 17:49  测试小潘  阅读(69)  评论(0)    收藏  举报