postman+newman+jenkins接口自动化
postman用来做接口测试非常方便,接口较多时,则可以实现接口自动化
目录
1、环境准备
2、本机调试脚本
3、集成jenkins
1、环境准备
1.1安装nodejs6.0+
安装nodejs6.0+(github上面写的版本要求),用于安装newman4.0+,到nodejs官网下载即可https://nodejs.org/en/download/releases/
1.2安装newman
npm install -g newman
1.3安装newman-reporter-html
npm install -g newman-reporter-html
2、本机调试脚本
1.1了解命令行执行脚本
可以查看github上面的命令说明https://github.com/postmanlabs/newman#configuring-reporters、https://github.com/postmanlabs/newman-reporter-html#readme
run XX.json #执行脚本
---reporters html --reporter-html-export /路径 #导出执行结果到此路径,若指定输出报告,则只会在dos窗口输出执行结果
-e XX.json #带上环境变量
1.2从postman下载脚本到本机
下载脚本:
下载环境变量:
1.3本机调试出报告
newman run D:\test.postman_collection.json --reporters html --reporter-html-export D:\html01.html
在D盘下生成报告
3、集成jenkins
和其他项目配置jenkins一样,新建一个构建,然后在构建的地方,配置一下,windows的批处理命令
点击立即构建,查看控制台输出
在D盘下同样会生成报告
另:
1、还可以配置发送邮件等,本篇暂未介绍
最新文章
- flask-- 基础篇
- shell调用函数返回值深入分析
- WordPress 的 Google 字体问题解决办法
- Volley框架的使用
- 中科院 2014年GCT考前辅导课程安排
- Oracle查询经典
- 那些年被我坑过的Python——玄而又玄(第六章 面向对象编程基础)
- 设置ListView每条数据之间的间隔
- 深度学习 Deep Learning UFLDL 最新 Tutorial 学习笔记 1:Linear Regression
- Oracle存储过程function语法及案例
- node.js基础:HTTP服务器
- 类成员(static)和final修饰符
- 第五十五天 css基础入门
- 高级定时器TIM1&;TIM8
- spring ---->; ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh
- Ubuntu 14.10 下HBase错误集
- 【Selenium-WebDriver自学】Selenium-IDE工具特点(二)
- rc522头文件
- python的super用法及含义
- Shell中EOF内容转义