当前位置:网站首页>Interface test practical project 02: read interface test documents and practice
Interface test practical project 02: read interface test documents and practice
2022-07-28 01:01:00 【Program yuanyuexia】

This time, , We officially entered the testing stage .
Why do interface tests
There are many answers to this question , I just want to make an introduction for you .
01 Can accurately locate bug
such as : When you are testing a web page , It is found that the data displayed on the web page is incorrect , What are you gonna do? ?
Primary test , Direct mention bug To develop ; Advanced testing , It's going to position bug, But to locate bug, Be familiar with the interface .
02 Improve test efficiency
With 01, Naturally, there will be consideration of improving efficiency , This is one of .
second , If the item you are testing is separated from the front end and the back end , The back-end test time is often earlier than the front-end test time . If you are a back-end test , You have to wait for the front-end test , Just start the test ?
here , You need interface testing , Go through the back-end interface first , Solve problems as soon as possible .
03 Get familiar with the business from a technical point of view , Discover hidden dangers of the program
Now many large and medium-sized companies are advocating : The test should be able to walk through the developed code , Understand the business more deeply through code .
The first step of business code walkthrough , It often starts with the interface —— Look at the call , Look at the back-end logic processing , Look at the data returned from the backend , These are closely related to the knowledge of interfaces .
……
Interface document
Before the interface test , We need to understand the concept of interface document .
Interface document , To put it bluntly , It's a document for people to view ( It is generally used Restful Style writing ), Write standards by standardizing interface documents , Ensure that documents written by different people are readable and maintainable .
Otherwise A It's a writing style ,B It's a writing style ……N It's a writing style . As a test of you , Get one AB……N Class style interface document , You break down no ?
Open the previously provided interface test project , There is an interface document .

Read interface documentation , In addition to the necessary description , The key information is interface resources :
01 Familiar with interface resources ( The blue part )
URL Location resources : One URL( Interface ) Locate a resource ( What you want to get )
methond Operating resources : That is, what you want to do with this thing ( Beginner's understanding GET- check 、POST- increase 、PUT- Change 、DELETE- Delete , that will do )
02 Request resources ( The yellow part )
As shown in the figure , Incoming data ( It's usually json data format ), Initiate request
03 Respond to : Requested results ( The red part )
Response code of the request + The result of the response ( It's usually json data format )
And about the json Explanation of format , Just look at this picture ( It's worth collecting ~)

Interface request hands-on practice
After understanding the interface documentation , Let's practice a wave .
01 Start project , open postman
02 Read the interface documentation , About adding college information

03 Initiate request ( It corresponds to the red, yellow and blue parts above one by one ~)
http://127.0.0.1:8099/api/departments/
{"data":[ {"dep_id":"T01","dep_name":"AABB","master_name":"Test-Master","slogan":"Here is Slogan" } ]
above , success ! If you need a full set of projects, you can contact me , In case of problems , You can leave a comment below .
The next article explains the execution of test cases
边栏推荐
- [proteus simulation] 51 single chip microcomputer washing machine simulation control program
- Scrollview, tableview nested solutions
- "C language" deep entry rounding & four functions
- Recurrence of fastjson historical vulnerabilities
- Network device hard core technology insider firewall and security gateway (VIII) virtualization artifact (middle)
- Postman download and use tutorial
- 推荐系统-模型:dssm双塔模型做embedding的召回
- Process and process scheduling
- 推荐系统-精排模型:xDeepFM
- The program design questions of the 11th national competition of Bluebridge cup single chip microcomputer
猜你喜欢

Confused SCM matrix keys
![[proteus simulation] 51 single chip microcomputer washing machine simulation control program](/img/a1/d4256a5e350078b791c0b5cd512fe3.png)
[proteus simulation] 51 single chip microcomputer washing machine simulation control program

Recommend a Hongmeng instant messaging software "fruit chat", which is a bit awesome!!

One year anniversary of creation, Chongba young Lang

Postman download and use tutorial
![[CruiseControl]Build Result JSP](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[CruiseControl]Build Result JSP

110. SAP UI5 FileUploader 控件深入介绍 - 为什么需要一个隐藏的 iframe

Build Release Blogs

Rancher2.6 monitoring grafana docking LDAP

接口测试实战项目02:读懂接口测试文档,上手操练
随机推荐
MySQL limit usage and large paging problem solving
C语言程序设计 | 单身狗题目讲解
Leetcode:1997. the first day after visiting all rooms [jump DP]
【C语言入门】ZZULIOJ 1026-1030
From the second floor to the third floor
When Jerry made a phone call, recording to SD card /u disk was not enough [article]
Ddt+yaml implementation of data driven mechanism based on unittest
Canvas analog input box input
Confused SCM matrix keys
C语言程序设计 | offsetof宏的讲解及其模拟实现
融云 IM & RTC 能力上新盘点
Current situation of semiconductor testing equipment Market: the localization rate is still less than 10%!
推荐系统-模型:wide&deep 模型
Count the six weapons of the domestic interface cooperation platform!
Jericho will make a popping sound when turning on, broadcasting a prompt tone, and turning off [chapter]
ASML launched the first generation HMI multi beam detector: the speed is increased by 600%, which is suitable for 5nm and more advanced processes
Postman download and use tutorial
网络设备硬核技术内幕 防火墙与安全网关篇 (七) 虚拟化神器 (上)
Jerry's PWM setting and PWM IO selection [chapter]
Buildforge materials