一、 postman自动化介绍

postman自动化集成jenkins项目,postman做单接口测试非常方便,
所以就尝试着去做了一次postman+nweman+jenkins的持续集成项目。

二、 项目软件

postman+node+newman+jenkins

三、 安装

1.  安装postman客户端
2.  安装node.js
3.  安装newman: npm -g install newman

四、 使用说明

1. 创建postman collection

image-1666358134885

2. 加入test断言

image-1666358263613

3. run collection

image-1666358279601

image-1666358290996

image-1666358297840

4.也可以在中软执行,首先导出

image-1666358311721

5.在终端执行导出文件

newman run practise_collection.postman_collection.json

image-1666358327655

6.同时想生成报告:

npm install -g newman-reporter-html

newman run practise_collection.postman_collection.json --reporters html --reporter-html-export E:\postman_automation\test\report1.html

image-1666358354566

image-1666358362471

7.jenkins集成postman

image-1666358383034

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐