# Writing tests

To write tests using Cover Plugin for IntelliJ:

<table><thead><tr><th width="226">IntelliJ</th><th>Action</th></tr></thead><tbody><tr><td>Editor Panel</td><td>Click the <img src="/files/TRs4tlE0pn7ElgpeOMWT" alt="" data-size="line"> <a href="/pages/JqCjyIzhQ87fC5eK52KZ">Write Tests gutter icon</a>.</td></tr><tr><td>Editor Panel</td><td>Right-click a method or class and select <code>Write Tests</code>.</td></tr><tr><td>Editor Panel</td><td>Select <code>Diffblue</code> > <code>Write Tests</code> from the <a href="/pages/H1Z2pqQNjOwBIjoIStle#diffblue-menu-bar">IntelliJ menu</a>.</td></tr><tr><td><a href="/pages/H1Z2pqQNjOwBIjoIStle#project-tool-window">Project Tool Window</a></td><td>Right-click a folder or file and select <code>Write Tests</code>.</td></tr><tr><td><a href="/pages/H1Z2pqQNjOwBIjoIStle#structure-tool-window">Structure Tool Window</a></td><td>Right-click a method or class and select <code>Write Tests</code>.</td></tr><tr><td><a href="/pages/DYexS9iYfu4RWMube7LQ">Run Configurations</a></td><td>Select <code>Run > Edit Configurations</code> from the IntelliJ menu.</td></tr></tbody></table>

{% hint style="info" %}
Once started, if you need to cancel the test writing process at any point, click the red **Stop** button in the [Cover Plugin tool window](/features/cover-plugin/writing-tests/diffblue-cover-tool-window.md).
{% endhint %}

In general, if the **Write Tests** option is available then Cover Plugin can write tests for your methods or classes. However:

* If it is not possible for Cover to write a complete test, instead a partial test may be created - see [Creating partial tests](/features/cover-plugin/writing-tests/partial-tests.md).
* If you don't want to write a complete test, Cover Plugin can help set up your tests by creating a skeleton test instead - see [Creating skeleton tests](/features/cover-plugin/writing-tests/skeleton-tests.md).


---

# 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-plugin/writing-tests.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.
