-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
This guide takes you from zero to your first generated test. It should take about five minutes.
You'll need:
- Python 3.11 or later (
python --versionto check) - Node.js 18 or later (
node --versionto check) - Claude Code (Canary runs as a plugin — no separate API key needed)
- Git
git clone https://github.com/bop-clocktower/canary.git
cd canary
pip install -e .Verify the install worked:
canary versionYou should see the Canary banner with the current version number.
Canary runs as a Claude Code plugin — no API key setup required. Install the plugin once:
claude plugin install .Claude Code's own session provides the LLM. Your first
/canary:generate will analyse the target file and write tests
automatically.
In Claude Code, invoke the test-author persona:
/canary-write-test Test that GET /api/health returns 200
Canary will:
- Classify the intent (API test)
- Pick the best framework (pytest)
- Generate a test file
- Print the path to the file
The output looks something like:
Canary Processing Request...
Test Type: api
Framework: pytest
Reasoning:
- HTTP endpoint test maps to API category
- Python ecosystem detected, pytest preferred
Output File:
tests/generated/api/test_api_health_get_200.py
cat tests/generated/api/test_api_health_get_200.pyRead through it. Check that:
- The endpoint matches what you intended
- The assertion matches the expected behavior
- There are no placeholder values you need to fill in
Once the file is written, run it with the CLI executor (deterministic, no key):
canary run tests/generated/api/test_api_health_get_200.py pytestOr invoke the framework directly:
pytest tests/generated/api/test_api_health_get_200.pyGenerated tests live in tests/generated/ — a scratch space
that is not committed to git. They're yours to review and
run freely.
Once a test passes review, you can promote it into the committed test suite. See the canary-promote-test skill for the full promotion checklist.
Use canary recommend to see what framework Canary would pick, with its
reasoning — a deterministic CLI command that makes no LLM call:
canary recommend "load test the search endpoint"- Writing Good Prompts — get the test you actually want on the first try
- For Manual Testers — if you're coming from a manual testing background
- Troubleshooting — if something went wrong above