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、还可以配置发送邮件等,本篇暂未介绍

最新文章

  1. flask-- 基础篇
  2. shell调用函数返回值深入分析
  3. WordPress 的 Google 字体问题解决办法
  4. Volley框架的使用
  5. 中科院 2014年GCT考前辅导课程安排
  6. Oracle查询经典
  7. 那些年被我坑过的Python——玄而又玄(第六章 面向对象编程基础)
  8. 设置ListView每条数据之间的间隔
  9. 深度学习 Deep Learning UFLDL 最新 Tutorial 学习笔记 1:Linear Regression
  10. Oracle存储过程function语法及案例
  11. node.js基础:HTTP服务器
  12. 类成员(static)和final修饰符
  13. 第五十五天 css基础入门
  14. 高级定时器TIM1&TIM8
  15. spring ----> ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh
  16. Ubuntu 14.10 下HBase错误集
  17. 【Selenium-WebDriver自学】Selenium-IDE工具特点(二)
  18. rc522头文件
  19. python的super用法及含义
  20. Shell中EOF内容转义

热门文章

  1. js放大镜特效
  2. LOCK - 明确地锁定一个表
  3. Django中利用type动态操作数据库表
  4. ST7735和ST7789驱动
  5. Android相关资源
  6. 初始化一个React项目
  7. 【leetcode】1170. Compare Strings by Frequency of the Smallest Character
  8. handy源码阅读(六):tcp类
  9. lua脚本入门
  10. UML规则笔记