> Markdown version of [/videos/977-test-reduction-doing-more-with-less](https://www.wearedevelopers.com/videos/977-test-reduction-doing-more-with-less). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Test-reduction - Doing more with less Are your unit tests actually spotting bugs, or just padding coverage metrics? Learn how mutation and property-based testing dramatically reduce boilerplate while aggressively catching critical edge cases. - **Speakers:** [Ewald](https://www.wearedevelopers.com/@ewald) - **Event:** World Congress 2024 - **Published:** August 20, 2024 - **Duration:** 23:40 - **URL:** https://www.wearedevelopers.com/videos/977-test-reduction-doing-more-with-less ## Summary Unit testing is often viewed as a mandatory chore, leading developers to inevitably ask, "When have I done enough?" Relying strictly on quantitative metrics like code coverage is easily manipulated and misses the mark on actual test quality. Moving from a broad code coverage mindset to a test coverage focus requires mechanisms that validate whether tests are genuinely catching faults. Mutation testing addresses this gap by intentionally injecting changes, or "mutants," into the source code to see if the existing test suite successfully catches the defects, thereby proving the qualitative value of the tests. To build these tests without drowning in boilerplate code, engineers must move beyond basic test design techniques. Simple error guessing mostly confirms happy paths, while comprehensive decision tables—mapping out every combination of boolean inputs—quickly lead to a combinatorial explosion of hardcoded unit tests. Property-based testing, utilizing frameworks like Python's Hypothesis, solves this scalability problem. By describing expected input constraints and functional output properties instead of writing discrete examples, the framework automatically generates thousands of localized, complex edge cases. This dramatically reduces the raw amount of code developers must maintain while aggressively probing anomalous scenarios like empty lists and unescaped characters. Ultimately, balancing technical rigor with development speed comes down to applying risk-based testing principles. Because an engineering team simply cannot test everything exhaustively, testing strategies must be scaled according to estimated probability and business impact. By establishing a collaborative risk matrix, teams can confidently pragmatize their efforts—relying on rudimentary error guessing for low-risk features while reserving powerful techniques like mutation testing and property-based automated test generation for high-impact, critical systems. **Keywords:** unit testing test reduction, code coverage vs test coverage, mutation testing frameworks, property-based testing, python hypothesis library, automated test data generation, decision table complexity, error guessing techniques, edge case discovery, risk-based testing matrix, surviving mutant validation, test suite quality metrics, software quality assurance methodologies ## Chapters 1. **Understanding the chore and effort of unit testing** (00:00) — Treating unit testing as an afterthought leads to uncertainty about when testing is effectively complete. 1. **Distinguishing code coverage and test coverage metrics** (02:55) — Measuring executed lines of source code fails to reflect the actual quality of test assertions. 1. **Evaluating test suite quality through mutation testing** (05:47) — Introducing deliberate logic changes into source code verifies whether tests accurately capture unexpected behavior. 1. **Finding edge cases beyond simple error guessing** (08:21) — Relying purely on intuition for initial test creation often misses essential edge cases. 1. **Scaling test cases with the decision table technique** (11:18) — Creating explicit test combinations manually becomes difficult to maintain as the number of variables increases. 1. **Generating complex edge cases using property-based testing** (15:04) — Defining required input properties rather than exact values enables automated generation of difficult technical edge cases. 1. **Reducing test efforts by applying risk-based testing** (20:21) — Balancing component failure probability against business impact helps testing teams apply appropriate validation techniques. ## Related Moments - [Essential checklist for reliable AI-generated test suites](https://www.wearedevelopers.com/videos/100007-your-tests-are-lying-to-you-let-ai-expose-what-you-missed) (from "Your Tests Are Lying to You: Let AI Expose What You Missed") - [Optimizing test return on investment with targeted strategies](https://www.wearedevelopers.com/videos/996-why-i-love-end-2-end-tests-and-how-to-get-them-right) (from "Why I Love End-2-End Tests and How To Get Them Right") - [Evaluating test suite quality using mutation testing](https://www.wearedevelopers.com/videos/703-mutation-testing-and-fuzzing-in-c) (from "Mutation Testing and Fuzzing in C#") - [Advancing through unit testing maturity levels](https://www.wearedevelopers.com/videos/722-are-you-still-programming-unit-tests-or-already-generating) (from "Are you still programming unit tests or already generating?") - [Adopting a pragmatic approach to reasonable software engineering tests](https://www.wearedevelopers.com/videos/175-how-not-to-test) (from "How not to test ") - [Rethinking the testing pyramid and deleting risk-free tests](https://www.wearedevelopers.com/videos/1672-your-testing-strategy-is-broken-lets-fix-it) (from "Your Testing Strategy is broken - lets fix it!") ## Related Articles - [Integration And E2E Testing: Are They Complementary or Interchangeable?](https://www.wearedevelopers.com/magazine/86-integration-and-e2e-testing-are-they-complementary-or-interchangeable) - [Ignore the Hype: How to Avoid Being Deceived by Technological Trends](https://www.wearedevelopers.com/magazine/528-ignore-the-hype-how-to-avoid-being-deceived-by-technological-trends) - [Dev Digest 119 - ❤️ === ❤️](https://www.wearedevelopers.com/magazine/454-dev-digest-119) - [Liuba Gonta and Yuliya Khadasevic - GitHub Copilot Beyond the Basics - 10 Ways to Elevate Your Coding](https://www.wearedevelopers.com/magazine/490-liuba-gonta-and-yuliya-khadasevic-github-copilot-beyond-the-basics-10-ways-to-elevate-your-coding) ## Related Jobs - [Test Engineer](https://www.wearedevelopers.com/jobs/ext/1872489-test-engineer) at **ZEISS Group** - [Software Tester (f/m/d)](https://www.wearedevelopers.com/jobs/44712-software-tester-f-m-d) at **Power Plus Communications** - [QA Automation Engineer](https://www.wearedevelopers.com/jobs/ext/1414297-qa-automation-engineer) at **Bitpanda** - [Engineer, Offensive Security Organization](https://www.wearedevelopers.com/jobs/ext/1992296-engineer-offensive-security-organization) at **Twilio** - [Softwaretester Embedded Linux Systems](https://www.wearedevelopers.com/jobs/ext/1432629-softwaretester-embedded-linux-systems) at **Power Plus Communications AG** - [Staff, Analytics Engineer](https://www.wearedevelopers.com/jobs/ext/569504-staff-analytics-engineer) at **Twilio**