# Get started - Cover Optimize

Diffblue Cover Optimize speeds up the time required to run Java unit tests by running only the tests in your project that are relevant to your code change (defined in a patch file). Cover Optimize is provided as a:

* **Gradle Plugin** - The plugin acts as a wrapper around Cover CLI, invoking Diffblue Cover Optimize before the Gradle `Test` task. The plugin calculates the impact of the patch file on your codebase and applies filters to the `Test` task to ensure that Gradle only runs the tests relevant for the changes introduced.
* **Maven Plugin** - The plugin acts as a wrapper around Cover CLI, invoking Diffblue Cover Optimize during `mvn test` or `mvn verify`, and feeding its output into Maven’s Surefire & Failsafe plugins in order to only run the tests exercised by the patch.

Cover Optimize can be used by developers using Cover CLI, reducing wait time and saving workstation loading, but can also be integrated directly into your CI Pipeline (with Cover Pipeline) saving cloud computing costs and optimizing PR workflows.

<div align="left"><figure><img src="/files/PoBH1gBmw07Lgun3sF3G" alt=""><figcaption></figcaption></figure></div>

Prefer video? No problem. Check out our getting started video.

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

## Next steps

The configuration required for Gradle and Maven is quite different so please refer to [Cover Optimize & Gradle](/features/cover-optimize/get-started-cover-optimize-and-gradle.md) and [Cover Optimize & Maven](/features/cover-optimize/get-started-cover-optimize-and-maven.md) for getting started information specific to each build tool.

{% hint style="info" %}
Note that Cover Optimize is currently not available for Cover Pipeline for GitLab.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://cover-docs-preview.diffblue.com/features/cover-optimize/get-started-cover-optimize.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
