首页 > 其他 > 详细

接口自动化 postman+jenkins实战

时间:2021-09-06 06:16:08      阅读:26      评论:0      收藏:0      [点我收藏+]

一、postman接口调试,断言

选择post请求方式,输入要请求的url,传参方式以混合表单为例,选择form-data,然后将参数名称和对应的值填入参数区,点击send发送请求,在响应区即可看到返回结果。如下

技术分享图片

二、nodejs安装及配置

 下载nodejs,它node.js不是库,是一个运行环境或者是一个js语言解释器,newman基于nodejs开发,补充postman,生成测试报告

 安装nodejs 

安装newman

1
npm install -g newman

贴图

newman 使用

安装newman-reporter-html      npm install -g newman-reporter-html

导出postman的脚本 

 

本机调试出报告

newman run D:\test.postman_collection.json --reporters html --reporter-html-export  D:\html01.html   *绝对路径要对应

 

技术分享图片

在D盘下会生成html报告

三、Jenkins

jenkins在Linux服务器上,需跨平台将windows上的文件传到Linux上

方式,安装pscp.exe ;属于Putty的重要组件工具之一,同时也可以单独使用,可以通过pscp.exe实现本地windows下的文件下载、上传到linux上

技术分享图片

 

接口自动化 postman+jenkins实战

原文:https://www.cnblogs.com/wei180/p/15226152.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!