Postman测试内容类型为text格式的请求

Postman测试内容类型为text格式的请求

Postman作为网页调试工具不仅可以调试简单的css、html、脚本等简单的网页基本信息,它还可以发送几乎所有类型的HTTP请求,Postman在发送网络HTTP请求方面可以说是Chrome插件类产品中的代表产品之一

下载地址:https://www.getpostman.com/

一、根据接口文档来测试注册登录请求(页面内容类型为text格式)
Postman测试内容类型为text格式的请求_第1张图片

1.request请求
新建collection与folder便于查看与管理

Postman测试内容类型为text格式的请求_第2张图片
2.添加环境变量
Postman测试内容类型为text格式的请求_第3张图片

设置环境变量
Postman测试内容类型为text格式的请求_第4张图片
添加环境变量
Postman测试内容类型为text格式的请求_第5张图片
3.设置注册及登录post请求

设置注册请求

Body部分
Postman测试内容类型为text格式的请求_第6张图片

Tests部分

Postman测试内容类型为text格式的请求_第7张图片

发送请求并获取响应

Postman测试内容类型为text格式的请求_第8张图片

Postman测试内容类型为text格式的请求_第9张图片

设置登录请求

Body部分
Postman测试内容类型为text格式的请求_第10张图片
Tests部分

测试脚本
Postman测试内容类型为text格式的请求_第11张图片

设置测试脚本
Postman测试内容类型为text格式的请求_第12张图片

发送请求并获取响应

Postman测试内容类型为text格式的请求_第13张图片
Postman测试内容类型为text格式的请求_第14张图片

添加数据文件
Postman测试内容类型为text格式的请求_第15张图片

Postman测试内容类型为text格式的请求_第16张图片
Postman测试内容类型为text格式的请求_第17张图片

你可能感兴趣的:(接口,软件测试)