> ## Documentation Index
> Fetch the complete documentation index at: https://jetify-dependabot-npm-and-yarn-npm-and-yarn-387f502f5a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# testpilot generate

> Generate a pilot plan from a prompt

```bash theme={null}
testpilot generate [test prompt] [flags]
```

## Description[​](#description "Direct link to Description")

<Info>
  This feature is experimental. It may generate erroneous or incorrect tests, and you should review
  any tests before executing or checking them in.
</Info>

Generate a pilot plan from a prompt. The prompt should describe the functionality to be tested, and
the command will generate a pilot plan with multiple test cases. For best results, include the URL
of the application under test in the prompt, as well as the expected behavior and any specific
scenarios to cover.

You can also provide additional context by specifying one or more files using the `--context`
option. This is useful for providing API documentation, example tests, or other relevant information
that can help the AI generate more accurate test cases.

## Examples[​](#examples "Direct link to Examples")

```bash theme={null}
# Generate a pilot plan for testing login functionality
testpilot generate "Test user login with valid and invalid credentials"

# Generate a plan with context from files
testpilot generate "Test checkout process" --context ./api-docs.md --context ./user-guide.md

# Generate a plan and save to a specific directory
testpilot generate "Test search functionality" --outdir ./tests/search
```

## Options[​](#options "Direct link to Options")

| Option              | Description                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------- |
| `--context strings` | Path to a file containing context for pilot plan generation (can be specified multiple times) |
| `-h, --help`        | help for generate                                                                             |
| `--outdir string`   | Directory to write the generated pilot plan to                                                |

## SEE ALSO[​](#see-also "Direct link to SEE ALSO")

* [testpilot](/docs/testpilot/reference/cli/testpilot) - Testpilot CLI
