> For the complete documentation index, see [llms.txt](https://nongnue.gitbook.io/sectum-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nongnue.gitbook.io/sectum-ai/sectum-ai-cover/coverage-report.md).

# Coverage Report

Sectum AI Cover analyzes your code to pinpoint gaps in existing test coverage. It then ensures that every generated or enhanced test adds meaningful value, **avoiding redundant or unnecessary tests while improving overall code quality**.

Coverage reports provide insights for developers to track progress and understand the impact of new tests.

**Get a Coverage Report**

1. Install Sectum AI Cover on your existing project `venv`:

Copy

Copy

```
pip install git+https://github.com/Codium-ai/cover-agent.git
```

1. If your project doesn't have a `pyproject.toml` file, create one:

Copy

Copy

```
[tool.poetry]
name = "cover-agent"
version = "0.0.0" # Placeholder
description = "Cover Agent Tool"
authors = ["SectumAI"]
license = "AGPL-3.0 license"
readme = "README.md"
```

1. Create a branch in your repository.
2. `cd` to your repository root directory.
3. Run the following command:

Copy

Copy

```
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_REGION_NAME=...

poetry run cover-agent-full-repo \
  --project-language="python" \
  --project-root="<path_to_your_repo>" \
  --code-coverage-report-path="<path_to_your_repo>/coverage.xml" \
  --test-command="coverage run -m pytest <relative_path_to_unittest_folder> --cov=<path_to_your_repo> --cov-report=xml --cov-report=term" \
  --model=bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
```

1. Alternatively, if you dont want to use `poetry`, replace `poetry run cover-agent-full-repo` with:

Copy

Copy

```
python ./venv/lib/python3.10/site-packages/cover_agent/main_full_repo.py (Give the path to your actual installation)
```

**Additional Configuration Options:**

* `--test-file [relative path]` Sectum AI Cover will extend tests in the provided file only.
* `--test-folder [relative path]` Sectum AI Cover will automatically extend only test files in the provided folder.
* `--max-test-files-allowed-to-analyze` The maximum number of test files to analyze. Default is 20.
* `--look-for-oldest-unchanged-test-files` Sectum AI Cover will sort the test files by the last modified date and analyze the oldest ones first. Use this option to find the test files that are most likely to be outdated, and for multiple runs. Default is False.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nongnue.gitbook.io/sectum-ai/sectum-ai-cover/coverage-report.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
