当前位置:网站首页>Interface test series - interface test practice of transfer transaction business scenarios
Interface test series - interface test practice of transfer transaction business scenarios
2022-06-09 02:24:00 【Testerhome official】
Source of the article : This article is excerpted from TesterHome Written by community enthusiasts 《2021 Interface test white paper 》.
01 Why The interface test
One 、 Increase of efficiency
key word :QA Responsible for completing the requirement test with quality and quantity guaranteed Improve efficiency on the premise of ensuring quality , Quality assurance , First of all, we need to find out the test scope of this requirement , Targeted use of different test methods , Interface testing is one of them ; Ensure efficiency , Reducing cost and increasing efficiency is an old topic of growth , It's also QA Always pursue , Promoting technology self-test is one way , Using automation instead of labor is also a way , But either way , We need to ensure the correct implementation of the main business process , Automation is the solution to this problem .
Two 、 Increase understanding of the business
key word : Be clear about the purpose of the requirements and the technical realization scheme
Recent high frequency words : Test shift left .
When the demand is approved , Just understand the purpose of the demand , from QA Give advice from an angle ; When reviewing the same technical proposal ,QA We also need to start from our own point of view , Starting from risk awareness , Point out the possible problems in the technical scheme , If QA Don't know anything about technology , During the technical review , There's no way to start .
key word : And RD Building a common language
The premise of communication is : Need to have a common topic . When RD When you don't understand the details ,RD I would say “ That's it , You do as I say ”——QA In a passive position . An impressive thing , A colleague pointed out RD Logical errors in code , From then on, some things will go very smoothly .
3、 ... and 、 Relatively high input-output
From the automation pyramid , Interface testing is a good way of input-output .
02 How How do you do it? ? Timing of application
One 、 During requirements testing
1.1 Zhongtai itself needs to connect with many business parties , The development workload of some demand business parties will be large , The middle stage only needs to do some configuration or little code development . This is the time , If the middle stage QA Also follow the test schedule on the business side , There will be unreasonable allocation of resources . Interface testing can solve this problem to a certain extent . Zhongtai RD After the test , Zhongtai QA Complete the interface test ; Business RD During the measurement , Zhongtai QA Just cooperate with the business QA Just test it ;
1.2 Big projects take a long time , And this time , Testers are usually multi person , If the process doesn't work , It affects a single time x Number of personnel . At present, some operations are being implemented during joint commissioning ,QA Conduct interface test ; After the test , Perform functional tests . This ensures that the main process is open ,QA You can also enter the state faster . ** Two 、 After the demand goes online , Supplementary use cases ** Process regression and monitoring are used most in automation scenarios , Sort out the business at intervals , And precipitate it in the form of documents and automated use cases .
03 During requirements testing
With XXX Take the project as an example ,XXX The business line adds a recycling business model , In order to set up a new business line id、 There are few changes in configuration of state machine , The business side needs to do a lot of development work .
04 Functional disassembly
UI Interaction : Don't involve A functional test : Business side test The interface test : Order creation , Order status flow Buried point : nothing Functional regression : nothing , New business lines
05 Technical review
Retrial compensation mechanism Abnormal scenarios such as parameter verification
06 Interface use case design
newly build 、 The circulation 、 retry 、 idempotent ,
Examples of actual situation of interface test :

07 Implementation of interface test
One 、 Use RD Single test code
There are the following disadvantages :
Management is not convenient
It cannot be reused in other projects
Cannot submit to gitlab
Two 、 Invest manpower in writing automation use cases
3、 ... and 、 Automated test platform
Two 、 3、 ... and The comparison is as follows :
Using platform , Reduces repetitive work outside of coding , Use cases can be assembled freely , There will be no people After the handover , The previous code is obsolete .
08 APITest Interface test platform
Two entrances : Demand dimension 、 Engineering dimension , Solve the demand test and after the service goes online , There are two scenarios for supplementary use cases .
give an example : Demand entry 
** To do a good job in interface testing , You can't isolate the interface .** On business scenarios , Is the interface 、mq、sql sentence 、redis And so on . Separate interface test , Only isolated points can be covered , Cannot cover the whole A process . To do a good job in interface testing , To connect the test platform, you need to put the tools used on a plane . at present apitest The idea is as follows For a use case , Use case aggregation is the use case set .
09 Schematic diagram of test set
Use cases are executed sequentially in the use case set , At present, it is not supported to interrupt the whole use case set if a single use case fails .
10 A parameterized
** When it comes to automation , You will encounter the problem of parameter passing .** All companies qa Because the tools in contact are not equally , The idea will be different .apitest It's using jsonPath How to resolve input and output parameters , Let data flow between use cases .
11 Assertion
apitest Also use jsonPath Analyze the results , To assert .
12 Test report
The test report is as follows , In two parts : Overview and details . The overview shows the information of the use case set dimension , Details show the execution results and assertion results of a single step .
13 Beetle linkage
There are two ways to trigger the use case set : Timing execution 、 Trigger execution . Scheduled execution will not be described in detail , Trigger execution beetle Active invocation of ,apitest Will return a unique execution record id, follow-up beetle Call the result query interface to get the test report of the use case set .
Next episode Trailer : Transfer transaction business scenario interface test practice
This article is excerpted from Testerhome Written by community enthusiasts 《2021 Interface test white paper 》, Click the link to view and download the full version 《2021 Interface test white paper 》.

边栏推荐
- About database: vba+sql uses select * from a where name1 regexp to 'protect', and the error prompt is "operator missing"
- C language warehouse cargo management system
- Golang of knowledge sharing -- a function based on whether a folder exists and whether a file exists
- Exploration and best practice of automatic verification of object acquisition technology
- 【编码推流】SRS流媒体服务器安装及使用
- C language guessing numbers game
- "The original, skillful and vulgar skills of cloud native" -- composition of Volume I of the national new college entrance examination in 2022
- Exporter les connaissances pertinentes
- Integrated base process test summary
- Read the log + regularize and extract the desired content + write the script to csv/xlsx
猜你喜欢

【编码推流】SRS流媒体服务器安装及使用

Implementation of UESTC daily report based on Selenium

How Bi makes SaaS products have a "sense of security" and "sensitivity" (Part I)

Hello, people returning to work. Musk has been searching for "workaholics" again. Is telecommuting good or bad?

【Unity在Inspector面板修改值时销毁物体或组件】

Servlet

21. Class E power amplifier design of ads usage record (medium)

NFT chain game system development | defi+nft technology construction

价值600的抖音云蹦迪直播间项目,靠直播打赏收益的风口项目源码

在业务代码中使用redis实现缓存效果
随机推荐
String 3-387. 字符串中的第一个唯一字符
Navicat tool batch imports JSON format data to Doris
力扣解法汇总1037-有效的回旋镖
[azure application service] nodejs express + msal application realizes aad login and obtains accesstoken -- cca acquireTokenByCode(tokenRequest)
disable_ function_ Bypass 2019 geek challenge rce_ me
大四学长谈程序员
Basic principle of digital circuit adder (I)
[FBCTF2019]RCEService
Indonesia widya robotics and Huawei cloud make the safety of construction sites visible
CVE-2020-3187
Senior learning long talk about programmers
GeoTrust certificate price
C language guessing numbers game
Hello, people returning to work. Musk has been searching for "workaholics" again. Is telecommuting good or bad?
Blue Bridge Cup_ N-ary linear equations_ Gauss elimination
Summary of 14 anomaly detection methods
FRP construction
Diffusion model最近在圖像生成領域大紅大紫,如何看待它的風頭開始超過GAN?
【网络协议】| 【01】网络字节序大端、小端
export相關知識