当前位置:网站首页>All you know is the test pyramid?
All you know is the test pyramid?
2022-06-24 08:12:00 【ThoughtWorks China】
Write it at the front
Test that pyramids used to exist like gods , Many people think that The test strategy know Test pyramids That's enough . Is that really the case ? today , Use this passage to talk with you Test pyramids .
If you happen to know the test pyramid , It is also regarded as the guideline of testing strategy , So this article is just right for you . If you don't know the test pyramid , But we are very concerned about quality and testing , So whatever your role is , This article is also suitable for you .
Most people know about the the Test Pyramid due to Mike Cohn, when he described it in his 2009 book Succeeding with Agile. In the book he refers to it as the “Test Automation Pyramid”, but in use it’s generally referred to as just the “test pyramid”. He originally drew it in conversation with Lisa Crispin in 2003-4 and described it at a scrum gathering in 2004. Jason Huggins independently came up with the same idea around 2006.
The test pyramid was first built by Mike Cohn Put forward ,Martin Fowler In the article TestPyramid There is a detailed introduction to . If you don't know the test pyramid , You can look at Martin The article .
In conclusion , The test pyramid is Automated test layering A reference model for coverage , Its characteristics are :
- The tests at the bottom of the pyramid are the tests closest to the code —— unit testing , Low writing cost 、 Fast execution 、 Positioning problems are also more accurate , But it is far away from the business layer , Can not well reflect the business value ;
- The test at the top of the pyramid is UI Automated testing of layers , This layer is close to the business , It can reflect the business process coverage , But the writing cost is high 、 Slow execution 、 Not stable enough 、 The positioning problem is also more difficult ;
- And the integration test of the middle layer , The cost and value are in the middle .
therefore , The pyramid suggests that the bottom unit test should account for the most , And the top UI Layer testing accounts for less , The integration test of the middle layer is in the middle , Present the pyramid structure as a whole .
This is suitable for ideal projects , In the actual project, there may be many situations that are not suitable for testing the pyramid :
###1. Microservice architecture system
Dependency and connectivity between services in a microservice system , Is the key to microservice testing , Relatively speaking , The possibility of internal errors in the service is small . therefore , For automated testing under the microservice architecture, it should be Honeycomb structure or spindle shape , That is, the integration tests between the m-server services are the most , Unit tests at the bottom and at the top UI There are relatively few tests .
2. Legacy system transformation
To support new business forms , More and more traditional industries are transforming to digital , One of the problems we face is the need to transform the legacy systems of large-scale and complex businesses . This situation , It is generally not appropriate to write a large number of unit tests , Technology and capability may not allow , Instead, we should start from the top-level business , First, add the function test of the business layer as the basic guarantee , At the same time to write API Integration testing and appropriate unit testing . Coverage of the entire automated test , It may be presented as Ice Cream Cone Structure form .
3. Teams with mismatched personnel skills
Some teams may have developers busy developing and not involved in writing tests , Only testers are responsible for writing tests , And testers who want to write unit tests must be familiar with the underlying code implementation , It may be difficult , Usually you can only write more UI test .
Of course , This is not a healthy state , Although it exists objectively , But we don't advocate .
4. The test strategy cannot rely solely on the test pyramid
Take the test pyramid as the only reference specification for test strategy development , It's not appropriate . Don't just focus on the test pyramid , Just focus on the layering strategy behind the test pyramid , It's not enough .
Test layering theory is more a guide to automated test layering , The test strategy needs to consider and pay attention to many more factors than this , such as : Business risk 、 Quality objectives 、 Lead time …… Numerous , It needs to be determined according to the specific project .
If you just focus on what the automated test will test , No attention to Business risk , It is possible to focus on testing the wrong function , The wasted effort , Do more harm than good .
Last , The test pyramid is not everything , Don't stress the test pyramid .
Test layering is one of the guiding frameworks for test strategies , The other is to test the four quadrants . More about testing strategies , Welcome to the following article :
writing /Thoughtworks Lin Bingyu
Link to the original text : The test pyramid is not everything -Thoughtworks Insight
边栏推荐
- LINQ 查询(2)
- 你还只知道测试金字塔?
- Mousse shares listed on Shenzhen Stock Exchange: gross profit margin continued to decline, and marketing failed in the first quarter of 2022
- Using kubeconfig files to organize cluster access
- Introduction to software engineering - Chapter 3 - Requirements Analysis
- 疫情下更合适的开发模式
- FPGA的虚拟时钟如何使用?
- Swift extension networkutil (network monitoring) (source code)
- redolog和binlog
- L1-019 who goes first (15 points)
猜你喜欢

没有专业背景,还有机会成为机器学习工程师吗?

Ad-gcl:advantageous graph augmentation to improve graph contractual learning

Introduction to software engineering - Chapter 2 - feasibility study

OC Extension 检测手机是否安装某个App(源码)

直播回顾 | 云原生混部系统 Koordinator 架构详解(附完整PPT)

Resolution error: LNK2019 unresolved external symbol

搜索与推荐那些事儿

The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain

Swift 基础 Swift才有的特性

Part 1: building OpenGL environment
随机推荐
[008] filter the table data row by row, jump out of the for cycle and skip this cycle VBA
Specify IP when calling feign interface
51单片机_外部中断 与 定时/计数器中断
Opening chapter of online document technology - rich text editor
自动化测试的未来趋势
Open cooperation and win-win future | Fuxin Kunpeng joins Jinlan organization
JDBC 在性能测试中的应用
Solution of electric education system for intelligent supervision station
Swift 基础 闭包/Block的使用(源码)
Shader common functions
从 jsonpath 和 xpath 到 SPL
Oracle advanced SQL qualified query
The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain
Live wire, neutral wire and ground wire. Do you know the function of these three wires?
毕业两年月薪36k,说难也不难吧
Chapter 1 overview of canvas
蓝桥杯_N 皇后问题
You get in Anaconda
Phonics
Easyplayerpro win configuration full screen mode can not be full screen why