Step 1: Install the Testpilot Binary
Install Testpilot by running the following command in your terminal:testpilot command.
Step 2: Set Your OpenAI API Key
Testpilot uses OpenAI’s API to generate and run tests. You’ll need to set your OpenAI API key as an environment variable:OPENAI_BASE_URL environment variable to point to your API endpoint:
.bashrc, .zshrc, etc.) to make it persistent across
terminal sessions.
If you don’t have an OpenAI API key yet, you can get one by:
- Going to OpenAI’s platform
- Creating an account or signing in
- Navigating to the API keys section
- Creating a new API key