目 录CONTENT

文章目录

postman自动化+newman+jenkins

懿曲折扇情
2023-02-23 / 0 评论 / 1 点赞 / 276 阅读 / 174 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2023-02-23,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
广告 广告

一、 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

1

评论区