Skip to main content
testpilot generate [test prompt] [flags]

Description

This feature is experimental. It may generate erroneous or incorrect tests, and you should review any tests before executing or checking them in.
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

# 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

OptionDescription
--context stringsPath to a file containing context for pilot plan generation (can be specified multiple times)
-h, --helphelp for generate
--outdir stringDirectory to write the generated pilot plan to

SEE ALSO

I