当前位置:网站首页>How to implement interface exception scenario testing? Exploration of test methods and implementation of test tools
How to implement interface exception scenario testing? Exploration of test methods and implementation of test tools
2022-06-22 14:11:00 【Software testing Fairy】
background : As the front and rear ends separate 、 The wide application of microservices and other technologies , Interface testing plays a more and more important role in the whole testing process , How to test the interface more efficiently 、 Measuring more fully has become an urgent problem to be solved .
Currently, when testing a specific interface , The commonly adopted method is that testers use interface testing tools according to the field value rules in interface documents ( for example Postman etc. ) Manually modify a field value in the interface message back and forth for testing .

This method is relatively friendly to single or simple interfaces , However, a system often contains a large number of interfaces 、 The interface logic is complex 、 The interface contains many fields , This brings many problems to the implementation of interface testing , For example, it takes time and effort 、 Big workload 、 Missing some test scenarios, etc .
At the same time, due to the tight project schedule and other reasons , In the process of interface testing, we usually pay more attention to whether the normal scenarios are implemented , Compared with the abnormal scene, the attention is not enough , Thus, it is very easy to cause relevant test problems .
therefore , In order to reduce the occurrence of such cases , This paper explores and practices this problem , Relevant methods are summarized , It has been applied to many projects , It worked very well .
Method exploration
Analysis and induction of abnormal scenarios
After analyzing and summarizing the relevant situations of abnormal scenario testing in the current interface testing , It can be roughly divided into two categories: basic exception scenarios and special exception scenarios , The basic exception scenario is applicable to each field in the specific interface , Special exception scenarios only apply to specific interface fields .
The specific classification and examples are shown in the figure below :

Method exploration
Combined with the analysis and induction of the above abnormal scenarios and the actual implementation of the current test interface test , The testing of interface exception scenarios can solidify the related repetitive work through the tool process , It is automatically tested by tools to reduce duplication of effort , Further improve test efficiency .
Technical implementation of interface exception scenario testing tool

Flow chart of interface exception scenario test tool
As shown in the above flow chart , The overall idea of technology realization is : First, the interface configuration and other relevant information of the interface to be tested are used as input , Then it is parsed and matched with relevant exception scenarios , Secondly, generate corresponding interface test cases and test scripts for the matched exception scenarios , Finally, the script execution generates the corresponding test results .
Application practice
Tool interface

Practical examples
XX Information query interface :

Application practice
At present, the method and tool have been applied to multiple projects and interfaces , More than 1000 abnormal scenario test cases have been generated , Multiple test defects were found , On average, reduce the workload to one third of the original manual test time , The test efficiency and test quality are significantly improved .
summary
Although it has been applied in many projects , Also achieved certain effect , But in the process of application , Also encountered many problems , for example : Currently, the supported exception scenarios are relatively limited 、 The form of interface documents is not uniform (excel、word etc. )、 The interface formats of each system are various , But at the moment it only supports http-json Type interface test, etc , These problems will be analyzed and solved one by one .
Besides , More in-depth exploration is needed in special exception scenarios , In this way, more test experience and special exception scenarios can be solidified and incorporated into the tool process , Then the corresponding use cases are generated and executed automatically , To save time 、 energy , Reduce the investment of testers in this field , Put more effort into other relatively more important tests , Further improve test quality and efficiency .
Last :
You can go to my personal number :atstudy-js, You can get one for free 10G Software Test Engineer interview classic documents . And the corresponding video learning tutorial is free to share ! It includes basic knowledge 、Linux necessary 、Mysql database 、 Caught tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance test, etc .
These test data , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you !
边栏推荐
猜你喜欢

VR panoramic shooting breaks the deadlock of traditional propaganda that wild geese pass without leaving traces
MySQL如何让一个表中可以有多个自增列

Stephencovey's tips for efficient work for young people

Getting started with go web programming: validators

Technology practice | scene oriented audio and video call experience Optimization

安装和使用protobuf-c

Offline physical stores combined with VR panorama make virtual shopping more realistic

openGauss内核分析之查询重写

Tianrun cloud is about to be listed: VC tycoon Tian Suning significantly reduces his holdings and is expected to cash out HK $260million

别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
随机推荐
史蒂芬·柯维写给年轻人的高效工作秘笈
Which securities company is good for retail investors to open an account? Is it safe to open a mobile account?
Leetcode math problems
Redis password modification, startup, view and other operations
毕业论文写作中致谢词的常见写法及优秀范文
JS advanced programming version 4: learning iterators
高薪程序员&面试题精讲系列114之Redis缓存你熟悉吗?Redis的key如何设计?内存淘汰机制你熟悉吗?
Stm32f1 and stm32subeide programming example - Optical intermittent sensor drive
能让Jellyfin直接挂载阿里云盘的aliyundrive-fuse
Policy deployment of firewall Foundation
Configuring cplex12.4 tutorial in VS2010
What is bout?
My suggestions on SAP ABAP transformation
CVE-2022-22965複現
力扣每日一练之双指针2Day9
芯片硅片与流片技术
Interpretation of the paper -- scalable collaborative filtering with jointly derived neighborhood interpolation weights
别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
openGauss数据库源码解析系列文章—— 密态等值查询技术详解
哈希索引设计发展史