当前位置:网站首页>When are the three tools used for interface testing?
When are the three tools used for interface testing?
2022-06-25 23:31:00 【Tian Tian Tian circle】
This article will produce , Because there happens to be a project , These two tools are used at the same time , It was the use of tools that freed my hands , Feel what efficiency is 、 Intelligent .
The story background
The test data of a function module cannot be operated through the interface , To simulate a real test scenario , The developer provides an internal interface document , I hope to reproduce the real use environment through interface calls .
Here I will talk about the test process and sequence , First, popularize what is Swagger UI.
Swagger UI
Swagger It's a group of open source projects , Interface documents can be generated automatically online , There is no need to update the interface document frequently , Ensure the consistency of interface documents and codes .
The real-time update here is one of its advantages . Just imagine , Some companies basically use word Maintain interface documentation , In case of interface change , The document is not updated in time .
Those who look up this document later exclude the error information , Plus communication time , The cost is too high .
People are lazy , This happens very often , And I think 80% All of the above will happen .
that Swagger UI The emergence of the no doubt reflects its advantages .
Using process
Input interface , Click on try it out.
Check the test results , General display 200 Prove successful call .
Verification process , Check whether the icon appears after the interface corresponding to the page succeeds , Or check that the content value in the database changes .
Think about Mars
In use , Find out Swagger UI The inconvenience is that the web page opens , Many parameters cannot be saved .
For example, the same interface may pass several parameters , There is a case of cyclic testing , So every time I call a new parameter , All need to be changed , Very inconvenient , So I thought of Postman.
Postman
About Postman I won't go into details about how to use it here .
The general process is to draw a clear picture ,5 Walking : Request mode -> route -> Format -> Parameters -> send out :
Think about Mars
After several rounds of testing, two problems were found :
1. I may need to call the same interface several times , Can you just click once ?
2. Some functions of the whole process can be implemented in sequence , In this way, can I test according to the process ?
After having this idea, I found that this is JMeter Can it be solved !
JMeter
Well known ,JMeter The most common use case is to test performance .
that , The main difference between interface and performance is that when setting the concurrency number, we can change the number to 1, This is equivalent to only one cycle .
Several interface records can be created for the process , adopt enable、disnable Decide which interface to execute when executing .
Configure multiple parameters
How to implement an interface to call multiple parameters , Here we use the call csv file , Write the parameter contents to csv Just in the file .
newly build csv Data file settings 、 Choose the path 、 Fill in the parameter name of the call , The parameter names of the following two figures should be consistent .

summary
Last , Summarize the characteristics of these three interface testing tools in the form of tables :
In the long history of development, human beings have experienced 4 The revolution , At present, we are in the age of 4 The revolution - Intelligent .
So is the software industry , Keep up with the trend of the times , Finding our own value is our mission and value . The renewal and iteration of technology are the realization that the current tools can not meet the needs of human beings , I believe that one day there will be more JMeter More intelligent tools for testing interfaces .
If you know a smarter way , Welcome to the bottom message area for discussion ~
Article reprint link :http://www.51testing.com/html/81/n-4477681.html
边栏推荐
- 统计字符串中不同回文子序列的个数
- [opencv450 samples] inpaint restores the selected region in the image using the region neighborhood
- 树状类查询组件
- Windows redis installation and simple use
- go中全类型等值判断解析&综合汇总
- How to solve the problem of SQL?
- BI-SQL丨存储过程(一)
- PDM fur
- Rk3568+ Hongmeng industrial control board industrial gateway video gateway solution
- qtcreator 格式化代码
猜你喜欢

How to use drawing comparison function in CAD

Ue4 Ue5 combine le plug - in de reconnaissance vocale de bureau pour la reconnaissance vocale

LeetCode-1528-重新排列字符串-哈希表-字符串

The software test interview has been suspended. The interviewer always says that the logical thinking is chaotic. What should I do?

干货丨产品的可行性分析要从哪几个方面入手?

Circuit module analysis exercise 5 (power supply)

Leaky API interface practical development series (13): gooseneck cloud service php-api two-dimensional array parameter transfer solution
![[Axi] interpretation of Axi protocol atomic access](/img/40/c742b861d92dfa2a1b27ae9ccc7a5d.png)
[Axi] interpretation of Axi protocol atomic access

RepOptimizer: 其实是RepVGG2

#24class静态成员
随机推荐
首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千
Paper notes: multi tag learning MSWl
[untitled] open an item connection. If it cannot be displayed normally, Ping the IP address
NLP text summary: use the pre training model to perform text summary tasks [transformers:pipeline, T5, Bart, Pegasus]
记一次beego通过go get命令后找不到bee.exe的坑
Recently prepared to translate foreign high-quality articles
[opencv450 samples] inpaint restores the selected region in the image using the region neighborhood
Windows redis installation and simple use
Comp2913 database
树状类查询组件
What is Unified Extensible Firmware Interface (UEFI)?
PDM fur
My C language learning process
CTS RTS RX TX in serial port flow control UART (direct communication between serial port module and MCU)
电路模块分析练习5(电源)
Svn icon disappearing solution
软件测试面试一直挂,面试官总是说逻辑思维混乱,怎么办?
NLP pre training model-2018:bert dictionary
我的vscode
How to use drawing comparison function in CAD