STEP 4: Set Baseline & Goal

Typically, this step is done by QA Manager/Architect or Engineering Manager.

Setting a baseline and goal for code coverage, creates a clear roadmap for improving the quality of your codebase over time. This approach enables you to prioritize your efforts, track progress, and make informed decisions to enhance the overall coverage and reliability of your software.

The KPI for both the checkpoints along the way and the final goal is the overall code coverage. Code Coverage measures the percentage of code that has been tested with at least one test.


How it Works?

  1. Generate a Test Gaps Report: Apply relevant code labels (such as feature, business transaction, or functionality) for targeted analysis.

  2. Understand Your Current State: Dive into the report to assess your current coverage, represented as percentages. Remember, higher numbers indicate less coverage (the inverse figure for code coverage). For instance, if you observe that 75% of the entire code is untested, it indicates that only 25% of the code has been covered by tests.

  3. Set Realistic Goals: Aim for a 10-15% increase over your baseline. For example, a baseline of 35% translates to a reasonable goal of 40%. Avoid overly ambitious targets, especially when starting out.

  4. Define Your Baseline: This is the minimum acceptable coverage level you want to maintain throughout your journey.

  5. Set Your Goal: This is the target coverage you strive to achieve by the end of your defined timeline.

The Roadmap to Success:

  • Conquer Checkpoints: Focus on achieving your goal for specific code subsets during each checkpoint.

  • Step-by-Step Coverage: Progressively move on to new subsets until all critical functionalities are covered.

  • Gradual Climb: Watch your overall coverage approach and reach your goal as you conquer each checkpoint.

  • Prioritize Critically: Remember, focus on covering essential code areas, not just any section.

By following this approach, you can steadily improve your code quality and enhance the overall reliability of your software.

Last updated