> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/guides/quality-improvement/quality-improvement-solution-overview/over-time-quality-improvement-guide/step-4-set-baseline-and-goal.md).

# STEP 4: Set Baseline & Goal

{% hint style="info" %}
Typically, this step is done by QA Manager/Architect or Engineering Manager.
{% endhint %}

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.&#x20;

***

### **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.

{% embed url="<https://youtu.be/ZrjySDAevGg>" %}

**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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/guides/quality-improvement/quality-improvement-solution-overview/over-time-quality-improvement-guide/step-4-set-baseline-and-goal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
