Test coverage

Test coverage image
What is test coverage?

Test coverage quantifies how thoroughly you've tested your software. It measures what percentage of your code executes during tests and how many requirements you've verified. While high coverage doesn't guarantee quality, it helps identify testing gaps. 


Do you have any examples of test coverage? 

Let's look at a login feature as an example. Coverage metrics might show that your tests: 
  • Verify successful login with valid credentials 
  • Check password validation rules 
  • Test the "forgot password" flow 
  • Validate error messages for incorrect inputs 
  • Exercise session timeout handling 

Together, these test cases achieve 90% coverage of the login module's code, though some edge cases remain untested. 

Why is test coverage important? 

Test coverage reveals blind spots where bugs could hide and gives you data to discuss testing progress with stakeholders. Higher coverage typically means lower risk, as you've verified more of your system's behavior. When coverage drops after code changes, you know you need additional tests. 


What are the challenges with test coverage?

Coverage metrics can be misleading. High percentages might hide shallow tests that don't validate behavior effectively. Complex features like concurrent operations are difficult to cover completely. Focus on balancing coverage goals with test quality, prioritizing critical business logic over perfect coverage. 

Remember that some code paths matter more than others—comprehensive testing of your core features beats 100% coverage of simple utility functions. 
Tool of The Week : Squish image
Who? UI and regression testers. Why? Cross-platform GUI testing. When? Automate early, test often. What? Squish by Qt
Explore MoT
Castelo Branco Meetup image
Tue, 6 May
The Future of Testing in an Automated World: Embracing Continuous Learning and A
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts. Early access available now at a discounted rate!
Leading with Quality
A one-day educational experience to help business lead with expanding quality engineering and testing practices.
This Week in Testing image
Debrief the week in Testing via a community radio show hosted by Simon Tomes and members of the community
Subscribe to our newsletter
We'll keep you up to date on all the testing trends.