postman+newman接口自动化测试

1:安装和配置

        需要先安装nodejs,并配置好环境变量

        验证:node  –v

        安装newman:npm install -g newman

        配置newman环境:

        验证:newman是否安装成

        newman -v

2newman的命令
        常见的参数
        e: 使用环境变量
        -g: 使用全局变量
        -d: 使用 csv , text,json 数据驱动
        -n: 循环次数
        -r :cli,html,json,junit --reporter-html-export

命令:

newman run C:\Users\26555\Desktop\练习.postman_collection.json

 postman+newman接口自动化测试_第1张图片

 

生成测试报告

首先下载html:npm install -g newman-reporter-html

postman+newman接口自动化测试_第2张图片

 postman+newman接口自动化测试_第3张图片

 Jenkinsde的使用

1.登录

postman+newman接口自动化测试_第4张图片

 2.postman+newman接口自动化测试_第5张图片

3.postman+newman接口自动化测试_第6张图片 

4.postman+newman接口自动化测试_第7张图片 

5.

postman+newman接口自动化测试_第8张图片 

 6.postman+newman接口自动化测试_第9张图片

7.postman+newman接口自动化测试_第10张图片 

8. postman+newman接口自动化测试_第11张图片

9.postman+newman接口自动化测试_第12张图片 

 10.postman+newman接口自动化测试_第13张图片

 

你可能感兴趣的:(postman,测试工具)