iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
You cannot prove software is defect-free by testing it, and a passing test suite is not a guarantee that users will never encounter a bug. Testing is a way to expose defects and reduce uncertainty. In a difficult-to-understand system, the practical goal is to build a portfolio of tests that gives timely, diagnostic feedback about the behavior users and dependent components rely on.
What testing principles mean for a hard-to-change system
Testing is evidence, not proof. The ISTQB testing principles note that testing can show the presence of defects, not their absence. Exhaustively checking every input, path, and state is generally infeasible, so teams prioritize cases according to risk and use techniques suited to the behavior they need to assess.
This matters especially in a system whose structure is tangled or poorly understood. Pearson’s publisher sample for Developer Testing: Building Quality into Software observes: “Testers approaching a system with The Big Ball of Mud architecture also face a daunting task.” The difficulty is real, but it does not mean testing must wait for a rewrite. Start by identifying important behavior, then improve the evidence and feedback available around it.
Set quality goals before choosing tests
Begin with the product risks and the behavior that matters, rather than a target number of tests. UK Home Office guidance says: “Make sure that there are clear quality goals established for the product, service or platform, so that you can more easily identify problems or risks.” Those goals help a team decide what to test, where to test it, and how much confidence a result should provide.
Useful goals describe observable outcomes or risks—for example, that a critical user workflow behaves as expected, or that a component continues to meet the contract relied on by another system. Weight test effort by the likely value of the evidence, the cost of obtaining and maintaining it, and the consequence of missing a failure. The Home Office quality assurance and testing guidance recommends automation across test levels and avoiding duplicated coverage.
Use the test pyramid as a planning metaphor
The test pyramid helps teams compare scope and feedback tradeoffs; it is not a mandatory shape or a formula for how many tests to write. Martin Fowler’s discussion of the practical test pyramid and his test pyramid article both emphasize that a useful portfolio depends on what each test establishes. Focused tests are often faster and easier to diagnose, while broader tests can provide confidence about integrated behavior that narrower tests cannot.
| Test scope | What it can establish | Feedback and diagnostic tradeoff |
|---|---|---|
| Focused unit or component test | Behavior within a small unit or component, often with dependencies controlled or replaced | Typically quick and easier to localize when it fails; may not establish that real dependencies work together |
| Integration test | Interaction across a boundary, such as between components or with a real dependency | Can reveal integration failures hidden by isolated tests; setup and diagnosis may require more effort |
| End-to-end or broad system test | A larger user-facing workflow through more of the system | Can provide realistic behavior confidence, but failures may be harder to localize and the test can be more costly to maintain |
These are tendencies, not guarantees: a flaky or expensive unit test may offer less useful feedback than a reliable broader test. Keep a broader test when it establishes meaningful behavior or integration confidence that focused tests do not. Remove or consolidate checks that merely repeat the same assertion without adding distinct evidence.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →How many tests should be at each level?
There is no universal unit-to-integration ratio established by these sources. The right balance depends on the system’s risks, the reliability and speed of its tests, how well failures can be localized, and the effort required to set up and maintain each level. A large pile of fast tests is not automatically a good portfolio if it misses important integration behavior; a broad suite is not automatically valuable if it is slow, brittle, and difficult to diagnose.
- Prefer the narrowest test that provides convincing evidence for a behavior.
- Add broader tests where they check a boundary or user workflow that narrow tests cannot cover adequately.
- Review failing-test diagnosis, maintenance burden, and feedback time—not just test counts.
- When two tests provide the same evidence, keep the more useful one or revise coverage so each test has a clear purpose.
Improve testability incrementally
In a tangled system, do not make a sweeping rewrite a prerequisite for useful tests. Choose a consequential behavior or risky boundary, determine what outcome should remain stable, and add a test that can observe it. Where possible, make the test’s setup and dependencies explicit so a failure gives useful diagnostic information. Then use what the test reveals to guide the next change. This is an incremental approach to improving feedback, not a promise that the architecture will become easy to test at once.
- Pick a risk: Identify a user behavior, business rule, or component interaction whose failure would matter.
- Describe the expected outcome: Make the quality goal observable, including relevant inputs and externally visible results.
- Choose the scope: Use a focused test for local behavior, or a broader test if the uncertainty concerns integration or an end-to-end workflow.
- Check the feedback: When the test fails, assess whether the cause is clear and whether setup, dependencies, or test scope need improvement.
- Expand selectively: Add coverage for a new risk or boundary rather than duplicating an assertion already established elsewhere.
What a successful test portfolio delivers
A useful portfolio does not claim that the system has no bugs. It makes important risks visible, gives engineers feedback soon enough to act on it, and combines test scopes so each contributes distinct confidence. For further reading on testing in difficult architectures, Pearson’s sample for Developer Testing: Building Quality into Software addresses the challenge directly.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

