The Keystone CLI enables powerful test recording by creating a secure tunnel between cloud-based Keystone Studio and your local development environment. This allows you to record tests against localhost, private networks, and development branches.
# Set up authenticated session# 1. Start runnerkeystone start --proxy --api-key your-api-key# 2. Log in manually in Studio-controlled browser# 3. Authentication state is preserved for recording# 4. Record authenticated user flows
# Start backend API servernpm run dev:api# Start frontendnpm run dev# Start recording tunnelkeystone start --proxy# Record tests that interact with local API# - API calls are captured automatically# - Responses are recorded for future stubbing# - Authentication headers are preserved
# Set up test databasenpm run db:seed:test# Start application with test datanpm run dev# Record against consistent test data# - Reproducible test scenarios# - Known user accounts and content# - Predictable application state