Recording with the CLI runner
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.Setting up for recording
Start the recording tunnel
- Control your local browser
- Access localhost and private networks
- Record interactions with development environments
- Capture network requests and responses
Verify recording readiness
Recording workflow
1. Start your application
2. Configure Keystone Studio
- Go to Keystone Studio
- Create a new test
- Set environment to “Local Development”
- Verify tunnel connection shows green status
- Set base URL to
http://localhost:3000
3. Begin recording
Click “Start Recording” in Studio to begin capturing interactions:- Browser opens: Studio controls your local browser via the tunnel
- Navigate to localhost: Go to your local application
- Interact naturally: Click, type, navigate as a user would
- AI captures intelligently: Smart selectors and timing automatically recorded
4. Complete and save
When finished:- Click “Stop Recording” in Studio
- Review captured steps and add descriptions
- Test playback to verify recording quality
- Save to your cloud test library
Recording capabilities
What gets captured
User interactions:- Clicks on buttons, links, and elements
- Text input in forms and fields
- Keyboard shortcuts and navigation
- Mouse movements and hover actions
- Scroll positions and viewport changes
- Loading states and animations
- AJAX requests and responses
- Modal dialogs and popups
- Form validation and error messages
- Real-time content updates
- API calls to your local backend
- Authentication flows and token handling
- File uploads and downloads
- WebSocket connections
- External service integrations
Smart recording features
AI-powered selectors:- Chooses most stable element identifiers
- Avoids fragile CSS classes and IDs
- Uses semantic attributes when available
- Falls back gracefully when elements change
- Automatically detects loading states
- Waits for dynamic content to appear
- Handles asynchronous operations
- Adapts to variable response times
- Understands form flows and multi-step processes
- Recognizes authentication requirements
- Detects error states and recovery paths
- Captures conditional logic and branching
Advanced recording scenarios
Recording with authentication
Recording API interactions
Recording with test data
Recording error scenarios
Recording best practices
Environment setup
Clean state:- Start with fresh browser session
- Clear cache and cookies if needed
- Reset application to known state
- Use consistent test data
- Ensure stable internet connection
- Avoid network throttling during recording
- Test on same network as development
- Consider VPN impacts on recording
Recording technique
Natural interactions:- Interact as a real user would
- Don’t rush through flows
- Let pages load completely
- Use realistic data and inputs
- Record complete user journeys
- Include setup and teardown steps
- Handle expected variations
- Test both success and failure paths
Post-recording optimization
Review and refine:- Check recorded steps for accuracy
- Add meaningful descriptions
- Remove unnecessary steps
- Optimize waiting strategies
- Run recorded test to verify functionality
- Test in different environments
- Validate with different data sets
- Ensure reliable reproduction
Recording limitations
Same-origin restrictions
Direct recording only works for:- localhost applications
- Private network resources
- Development environments
- Applications on same domain
- External sites require proxy mode
- Third-party integrations need special handling
- OAuth redirects may need configuration
- CDN resources should be accessible
Session management
Current limitations:- Single browser session at a time
- No concurrent recording sessions
- Session state tied to browser instance
- Manual session cleanup required
- Multi-session support
- Session isolation
- Automatic cleanup
- Concurrent recording capabilities
Troubleshooting recording
Connection issues
Browser problems
Recording failures
Common issues:- Network timeouts during recording
- Element selection failures
- Authentication state loss
- Browser crashes or hangs
- Restart runner and try again
- Check application logs for errors
- Verify network connectivity
- Update Chrome browser if needed
Performance optimization
Local vs cloud recording
Local recording benefits
Full control:- Access to localhost and private networks
- Real browser with full dev tools
- Local file system access
- No network latency
- Test against current branch
- Debug with local tools
- Iterate quickly on changes
- Access to source code
Cloud recording benefits
Team collaboration:- Shared test library
- Consistent environments
- No local setup required
- Scalable execution
- Managed browser environments
- Automatic updates
- Global accessibility
- High availability

