-
-
-
-
URL copied!
When it comes to testing software projects, the industry is obsessed with shapes. The Testing Pyramid is the most recognisable of these testing shapes. It describes how test suites should follow an ideal ratio of test types, typically, many unit tests, some integration tests, and a few end-to-end or user interface (UI) tests.
The core idea behind this is a good one. Unit tests are typically easier to develop and maintain than integration tests. In addition, UI tests are notoriously difficult to manage as they often test too much. So better to spend our time covering risks using easy to develop tests that are tightly scoped and provide fast feedback.
However, the theory does not always match reality. Pressures to deliver to deadlines, technical & testing expertise or testing culture problems can lead to an ice cream cone shape instead. The whole pyramid turns upside down as the team does what it can to address risk using known methods.
Source: Medium
Worse, multiple shapes exist which extol a different test suite ratio with its own set of justifications. The advice changes, the shapes morph. Suddenly we have many different shapes which conflict with each other! My personal favourite is the testing trophy. The name suggests success from the very start.
Source: Twitter
Today, we discuss:
- What is causing all these new shapes to be produced in the first place?
- Why does the advice change?
- What shape is the best to follow?
Risk > pyramids
That last one is a trick question. Projects have unique risks, and by testing the hope is to understand more about these risks and ensure, when possible, mitigation. So, there can be no perfect shape. Shapes are created to try to address the different common sets of risks that exist in software projects. But instead of relying on the latest shape to guide your testing effort, I want you to think instead of risk.
Risk is the key. Understanding the risks that exist on your project and adapting the ratio of your tests accordingly. Responding to the specific needs of your project. For example, a Microservice Architecture will have more integration points than a Monolith Architecture. But each service should have tightly scoped logic. In this case, more risk is likely to exist in integrating services than the services themselves. Having many integration (or Pact.io) tests would better address this risk than limiting the numbers because a pyramid tells you to.
Understanding risk as a team with risk mapping
If your team wants to move beyond pyramids and start thinking more deeply about how testing should be structured on projects, you will need to understand risk. One way to do this is to have a risk mapping workshop.
Either in-person or remotely, gather your team. Show them your entire system architecture in a diagram. Going around the diagram each person should leave notes on areas that represent risks. Keep going until everyone is finished and cannot think of any more to highlight. This is where you really start to visualise the risks.
Step back from the diagram and look at all the notes left. What does the picture look like? Are there areas where notes left by the team seem to cluster together? This could highlight a risky area in your systems architecture. An area needing investigation and potentially additional testing.
Let’s say your team works on a project with a heavy emphasis on User Experience (UX) on a web-based UI. Upon completing a risk mapping workshop, it becomes clear the team is concerned about this UI. Therefore, they would like to focus testing efforts on the UI to minimise the risk. Investigation reveals the best way to cover this UI risk is with automated UI tests. The pyramid would tell you this is to be avoided. But your team is now better informed of the risk on this project. They went ahead and completed a risk mapping workshop and now know that the UI needs to be covered.
Tailor your shape and test suite ratio to risk
The example above shows us why so many shapes exist. We are all constantly adjusting our test suites to better address the risks of projects. After our adjustments are completed, we create a diagram naming it, a new testing shape is born. But we do not need new testing shapes. Our effort would be better spent investigating new ways to identify project risks. Training our teams to be pragmatic in addressing them. Developing the wisdom to know when we should diverge from the pyramid.
By analysing risk your team will be more confident that these risks have been addressed by your test suite. Increasing the likelihood that it is catching issues before they happen. Your teams can do this by using risk mapping techniques to discover where project risks exist and help start a conversation on how to address them to help improve the likelihood of delivering quality. This will be much more useful than a debate on shape!
Learn more
- Watch this excellent talk on Testability by Richard Bradshaw at the Ministry of Testing
- Read Testing is Good, Pyramids are Bad and Ice Cream Cones are Worse
***
A bit about the author
Thomas Shipley is a Delivery Consultant at GlobalLogic. He mentors, pairs, persuades and promotes shared quality ownership in teams. He has applied these ideas in multiple sectors including Financial Services, Retail, Gaming and Government within well-known organizations such as HSBC, John Lewis, Microsoft and HMRC. You can find out more at his blog: tomdriven.dev.
Top Insights
Manchester City Scores Big with GlobalLogic
AI and MLBig Data & AnalyticsCloudDigital TransformationExperience DesignMobilitySecurityMediaTwitter users urged to trigger SARs against energy...
Big Data & AnalyticsDigital TransformationInnovationRetail After COVID-19: How Innovation is Powering the...
Digital TransformationInsightsConsumer and RetailTop Insights Categories
Let’s Work Together
Related Content
Unlock the Power of the Intelligent Healthcare Ecosystem
Welcome to the future of healthcare The healthcare industry is on the cusp of a revolutionary transformation. As we move beyond digital connectivity and data integration, the next decade will be defined by the emergence of the Intelligent Healthcare Ecosystem. This is more than a technological shift—it's a fundamental change in how we deliver, experience, … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
View on payment industry modernisation: Drivers of change
The payment industry has been going through radical modernisation with multiple regulatory and infrastructure changes over the last five to ten years. The post-pandemic era has accelerated these efforts as consumer behaviour changed significantly during the COVID-19 outbreak. Consumers across the world expect real-time responses in all aspects of digital payment transactions and have adopted … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
GlobalLogic wins at the 2023 Analytics Institute Awards, Dublin
*This blog was updated on Friday 16th June. The team is excited to announce that GlobalLogic was named winners of the Emerging Technology Award at last night's Analytics Institute Awards! This prestigious award recognises organisations that have successfully employed new technologies such as IoT, Edge Computing, Machine Learning, or RPA. Our submission showcased the successful application of … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
MLOps Principles Part Two: Model Bias and Fairness
Welcome back to the second instalment of our two-part series – MLOps (Machine Learning Operations) Principles. If you missed part one, which focused on the importance of model monitoring, it can be found here. This blog explores the various forms that model bias can take, whilst delving into the challenges of detecting and mitigating bias, … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
The GlobalLogic Academy Programme – a personal, introspective recollection
Ben Graham – Academy 2022 Graduate/Delivery Consultant I am currently in the DevOps capability for consulting and a recent graduate of the Academy 2022 programme which ran from September to December. I’d like to detail my thoughts on the process and share how my fellow graduates and I felt going on this journey. The GlobalLogic … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
Seven steps to break down systemic gender barriers
Despite progress over the years, women are still significantly underrepresented in tech. Systemic gender barriers – such as unconscious bias, lack of access to education, and cultural norms – can make it difficult for women to break into the tech industry. But how do we break down these barriers? Follow our simple step by step … Continue reading In testing, think – risk analysis and not shapes! →
Learn More
Share this page:
-
-
-
-
URL copied!