# Unit tests (CLI)

Use Diffblue Cover from a command line to create tests for your projects.

{% hint style="info" %}
Before starting this learning path, we recommend that you first complete the [Cover CLI Get Started](/get-started/diffblue-learning/get-started/cover-cli-command-line.md) path.
{% endhint %}

## Start here...

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Writing Tests</strong></td><td>[2 min read]</td><td>A summary of how to write tests using Cover CLI.</td><td></td><td></td><td><a href="/pages/EKNY548nafA7gx7DaWbo">/pages/EKNY548nafA7gx7DaWbo</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Command Summary</strong></td><td>[2 min read]</td><td>A summary of the core Cover CLI commands and arguments.</td><td><strong>Title</strong></td><td></td><td><a href="/pages/95EqCHC4eyRtPzJQGww4">/pages/95EqCHC4eyRtPzJQGww4</a></td></tr><tr><td><img src="/files/EgdOkFqZ2bmomIoQMb10" alt="" data-size="original"> <strong>Cover CLI Overview</strong></td><td>[29 min watch]</td><td>Get a complete overview of Cover CLI with this tutorial video.</td><td></td><td></td><td><a href="https://youtu.be/LPHw0JNcMyw">https://youtu.be/LPHw0JNcMyw</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Commands &#x26; Arguments</strong></td><td>[reference]</td><td>Reference topic - details of all available commands and arguments.</td><td><strong>Title</strong></td><td></td><td><a href="/pages/ZdPmy6CyXPLH7MPm8dEJ">/pages/ZdPmy6CyXPLH7MPm8dEJ</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Test Examples</strong></td><td>[5 min read]</td><td>Unit test examples of varying complexity.</td><td></td><td></td><td><a href="/pages/RGdoN6c1wyxTRDjpc82E">/pages/RGdoN6c1wyxTRDjpc82E</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Project Configuration &#x26; Dependencies</strong></td><td>[9 topics]</td><td>Making sure your project configuration and dependencies meet the requirements needed to use Diffblue Cover.</td><td></td><td></td><td><a href="/pages/sv4K7V9vpMCckYsuwW2O">/pages/sv4K7V9vpMCckYsuwW2O</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Preflight Checks</strong></td><td>[5 min read]</td><td>Diffblue Cover's preflight features for checking the suitability of your environment.</td><td></td><td></td><td><a href="/pages/0A3dPGLMragBjW8cL0xL">/pages/0A3dPGLMragBjW8cL0xL</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Output Codes</strong></td><td>[5 reference topics]</td><td>Reference details - Diffblue Cover output codes, messages, and descriptions.</td><td></td><td></td><td><a href="/pages/DiI0TJu4KSoTEyFvEX8o">/pages/DiI0TJu4KSoTEyFvEX8o</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Specs &#x26; Reqs</strong></td><td>[reference topic]</td><td>Reference details - Diffblue Cover specifications and requirements.</td><td></td><td></td><td><a href="/pages/tOE4Og4ANV8WqleRsURm">/pages/tOE4Og4ANV8WqleRsURm</a></td></tr></tbody></table>

## Know more...

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Output Codes</strong></td><td>[5 reference topics]</td><td>Reference details - Diffblue Cover output codes, messages, and descriptions.</td><td></td><td></td><td><a href="/pages/DiI0TJu4KSoTEyFvEX8o">/pages/DiI0TJu4KSoTEyFvEX8o</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Working With Output Codes</strong></td><td>[12 topics]</td><td>Useful hints and tips to help resolve a range of output codes.</td><td><strong>Title</strong></td><td></td><td><a href="/pages/yKUcT5QPiTZdTHVPU3Rg">/pages/yKUcT5QPiTZdTHVPU3Rg</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Partial Tests</strong></td><td>[4 min read]</td><td>Creating partial (incomplete) tests.</td><td></td><td></td><td><a href="/pages/vGoqckEDZNJWv5QqkBx3">/pages/vGoqckEDZNJWv5QqkBx3</a></td></tr><tr><td><img src="/files/EgdOkFqZ2bmomIoQMb10" alt="" data-size="original"> <strong>Custom Inputs</strong></td><td>[22 min watch]</td><td>Demonstrating how to provide custom inputs to optimize test creation.</td><td><strong>Title</strong></td><td></td><td><a href="https://youtu.be/1xRWbErG92c">https://youtu.be/1xRWbErG92c</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Custom Inputs</strong></td><td>[12 min read]</td><td>Provide custom inputs to optimize test creation.</td><td></td><td></td><td><a href="/pages/9GUcfHWETFSaKnVXPnwi">/pages/9GUcfHWETFSaKnVXPnwi</a></td></tr><tr><td><img src="/files/EgdOkFqZ2bmomIoQMb10" alt="" data-size="original"> <strong>Custom Test Setup</strong></td><td>[31 min watch]</td><td>Demonstrating how to provide a custom base class to optimize test creation.</td><td></td><td></td><td><a href="https://youtu.be/TJnx2xPlL_4">https://youtu.be/TJnx2xPlL_4</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Custom Test Setup</strong></td><td>[6 min read]</td><td>Provide a custom base class to optimize test creation.</td><td></td><td></td><td><a href="/pages/TKmbwV26I6Y7CaVHLhK4">/pages/TKmbwV26I6Y7CaVHLhK4</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Test Naming</strong></td><td>[4 min read]</td><td>Test naming config and defaults.</td><td></td><td></td><td><a href="/pages/iZEt3IC3PyGqtP7S14Gi">/pages/iZEt3IC3PyGqtP7S14Gi</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Test Formatting</strong></td><td>[4 min read]</td><td>Configure the format of tests written by Cover CLI.</td><td></td><td></td><td><a href="/pages/o1kIa5S7gqF52YfR66cG">/pages/o1kIa5S7gqF52YfR66cG</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Test Insertion Order</strong></td><td>[2 min read]</td><td>Test method ordering in test classes.</td><td></td><td></td><td><a href="/pages/JHe8l3rqwenO2s7aobx6">/pages/JHe8l3rqwenO2s7aobx6</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Refactor</strong></td><td>[4 min read]</td><td>Use Cover Refactor to automatically suggest and apply refactorings to your code to help improve test coverage.</td><td></td><td></td><td><a href="/pages/c4uYoIUP7mR49JMKIW6c">/pages/c4uYoIUP7mR49JMKIW6c</a></td></tr></tbody></table>

## Next steps...

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><img src="/files/P7llAlB8ABjjnHkNT6Mp" alt="" data-size="original"> <strong>Cover CLI Admin</strong></td><td>Manage and maintain Cover CLI.</td><td></td><td></td><td><a href="/pages/0nGy7Xa1Kf88Z0ytdotP">/pages/0nGy7Xa1Kf88Z0ytdotP</a></td></tr><tr><td><img src="/files/P7llAlB8ABjjnHkNT6Mp" alt="" data-size="original"> <strong>Test Coverage</strong></td><td>Improve and manage test coverage.</td><td></td><td></td><td><a href="/pages/cQ31dMgQOiRGVMK9fAOj">/pages/cQ31dMgQOiRGVMK9fAOj</a></td></tr><tr><td><img src="/files/TDiM7GwAQ6Yb4XgSNlcN" alt="" data-size="original"> <strong>Tutorials</strong></td><td>A range of tutorials covering topics such as implementing a code change and working with Kotlin projects.</td><td></td><td></td><td><a href="/pages/WQx0QJbFmzAPzxVf74c3">/pages/WQx0QJbFmzAPzxVf74c3</a></td></tr></tbody></table>


---

# 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/get-started/diffblue-learning/developer/unit-tests-cli.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.
