# Generate Tests

{% hint style="info" %}
IDE Assist: Trigger via the IDE command [*`Generate Unit Tests`*](/v1/welltested-ai/ide-assist/commands.md#generate-unit-tests)
{% endhint %}

To generate tests for your annotated classes, you can use our simple command line across any platform Linux/MacOS and Windows.

```
dart run welltested:ai build
```

The request can take anywhere between 1-10 minutes to generate tests depending upon the number of new methods.&#x20;

After successful run, the tests appear in `/test` directory of you project.

> For convenience, we request you to generate tests in batches for a new project setup. Check [The Batching Rule](/v1/welltested-ai/unit-tests/good-to-knows/the-batching-rule.md)

### Maintaining Tests

If you make any changes to your existing functions or add new methods, you can re run the same commands and the AI will smartly update the tests.&#x20;


---

# 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://docs.welltested.ai/v1/welltested-ai/unit-tests/generate-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.
