当前位置:网站首页>Mock test using postman
Mock test using postman
2022-04-23 16:40:30 【Sink the wine cup and fleeting time】
Use Postman Conduct Mock test
Interface information
Interface path /mock/testdemo
Request header
Content-Type application/json
token 21232f297a57a5a743894a0e4a801fc3
Request body
{
"memberid": "264903145",
"phonenum": "17379797878",
"msg": {
"Country": " China ",
"Province": " Guangdong province, ",
"City": " guangzhou ",
"Isp": " telecom "
},
"type_code": 0
}
Response body
{
"code": "0000",
"msg": {
"result": "success",
"memberinfo": " Silver members ",
"membertype": "1"
}
}
Create a new one Mock service
1、 open Postman
, Click on the top left corner New
, choice Mock Server
2、 edit Mock Request information
Choose here Create a new API
, Create a new one Mock Of API Interface .
Method
Select the corresponding request methodRequest Path
Fill in the interface path information ,Request Body
Fill in the request body information ( You need to check this option in the setting on the right )Response Code
Fill in the response codeResponse Body
Fill in the response body information
3、 To configure Mock Service information
Fill in Mock Name of service ( Available in Chinese ), Check Make this Mock server private
( Unchecked ), This Mock Services can only be accessed privately by yourself
The yellow part is Mock Server address
If you need to do this Mock Service creation API key, You can click on the here
Open a browser page , Need to generate a API key,
name API key
Generate secret key information
When accessing this interface later , You must bring... In the request header API key, In order to visit successfully , It is equivalent to the role of an interface authentication
4、Mock Service creation succeeded
You can also meet this need Mock The interface of , Edit the definition again , Click on Examples
, To define template rules
The request header specifies Content-Type
The type of , add cookie / token Information , Specify the response returned json Information
visit Mock service
have access to postman 、jmeter And other interface testing tools , It is still used here postman
In the address bar Mock The server address and interface path are spliced into URL, Fill in the corresponding parameters , Send a request
You can find the content of the interface response , It's defined Examples
The content in
版权声明
本文为[Sink the wine cup and fleeting time]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231402128189.html
边栏推荐
- JMeter installation tutorial and solutions to the problems I encountered
- 文件操作详解(2)
- UWA Pipeline 功能详解|可视化配置自动测试
- Server log analysis tool (identify, extract, merge, and count exception information)
- Execution plan calculation for different time types
- Custom implementation of Baidu image recognition (instead of aipocr)
- MySQL personal learning summary
- Use itextpdf to intercept the page to page of PDF document and divide it into pieces
- DanceNN:字节自研千亿级规模文件元数据存储系统概述
- 众昂矿业:萤石浮选工艺
猜你喜欢
-
伪分布安装spark
-
MySql主从复制
-
Detailed explanation of UWA pipeline function | visual configuration automatic test
-
1959年高考数学真题
-
Detailed explanation of file operation (2)
-
Flask如何在内存中缓存数据?
-
计组 | 【七 输入/输出系统】知识点与例题
-
英语 | Day15、16 x 句句真研每日一句(从句断开、修饰)
-
New project of OMNeT learning
-
昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案
随机推荐
- 如何建立 TikTok用户信任并拉动粉丝增长
- 无线鹅颈麦主播麦手持麦无线麦克风方案应当如何选择
- loggie 源码分析 source file 模块主干分析
- 关于局域网如何组建介绍
- PyTorch:train模式与eval模式的那些坑
- Dlib of face recognition framework
- NVIDIA graphics card driver error
- Installation and management procedures
- 5-minute NLP: text to text transfer transformer (T5) unified text to text task model
- Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin
- MySQL master-slave synchronization pit avoidance version tutorial
- Construction of promtail + Loki + grafana log monitoring system
- Public variables of robotframework
- File upload and download of robot framework
- Selenium IDE and XPath installation of chrome plug-in
- Project framework of robot framework
- Use case execution of robot framework
- Use case labeling mechanism of robot framework
- Deepinv20 installation MariaDB
- Pycham connects to the remote server and realizes remote debugging
- DDT + Excel for interface test
- Pytorch: the pit between train mode and eval mode
- Introduction to how to set up LAN
- Loggie source code analysis source file module backbone analysis
- How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
- How to build tiktok user trust and drive fan growth
- 【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验
- Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme
- English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
- Knowledge points and examples of [seven input / output systems]
- 详解牛客----手套
- How does flash cache data in memory?
- 批量制造测试数据的思路,附源码
- 聊一聊浏览器缓存控制
- 深入了解3D模型相关知识(建模、材质贴图、UV、法线),置换贴图、凹凸贴图与法线贴图的区别
- 博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
- ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
- True math problems in 1959 college entrance examination
- MySQL master-slave replication
- ByteVCharts可视化图表库,你想要的我都有