CLI as your development tunnel
The Keystone CLI creates a secure tunnel between Keystone’s cloud-based test recorder and your local development environment. This means you can record tests against your local development server, including work-in-progress features on specific branches. Perfect for testing features before they’re deployed or validating changes in your local environment.Quick start workflow
1. Start your local development server
2. Start the Keystone runner in proxy mode
3. Record tests in Keystone Studio
- Go to Keystone Studio
- Create a new test and select “Local Development” environment
- The cloud recorder will connect through your CLI tunnel
- Navigate to
http://localhost:3000(your local app) - Record your test interactions as normal
- Tests are saved to the cloud but reference your local environment
Development branch testing
Testing feature branches
This workflow is perfect for testing features on specific branches:Benefits for development
- Test before deploy: Validate features before they reach staging
- Branch-specific tests: Create tests for features in development
- Local debugging: Debug tests with full access to browser dev tools
- Fast iteration: No deployment required to test changes
Running modes
Local mode (direct connection)
- Direct connection from local Keystone Studio
- Best for: Local development and testing
- Browser runs on your machine
- Full access to localhost and private networks
Proxy mode (cloud tunnel)
- Secure tunnel to cloud Studio
- Best for: Recording tests against local development
- Cloud-based test management with local execution
- Team collaboration on local environment tests
Common development workflows
1. Feature development testing
2. Bug reproduction and testing
3. API integration testing
CLI commands reference
Start the runner
Authentication management
Environment setup
Configure for your project
Create a.env.local file in your project:
Project scripts integration
Add CLI commands to yourpackage.json:
Local capabilities
When running locally, the CLI provides:- Visual recording: See exactly what actions are being recorded
- Real-time execution: Watch tests run with full browser visibility
- Network capture: Record API calls and responses
- Console logging: Capture browser console output
- Screenshot support: Automatic screenshots at each step
- Local file access: Test file uploads and downloads
Limitations to know
- Same-origin recording: Direct recording only works for localhost
- Cross-origin sites: Require proxy mode for cloud Studio access
- Single session: One browser session at a time (multi-session planned)
- Port requirements: Default port 9223 must be available

