Typing Secrets Securely
When you type sensitive information such as passwords, use thesecret: true option. This stops TestDriver from a log or a store of the value:
When you set
secret: true, the typed text shows as **** in all logs, recordings, and dashcam output.Storing Secrets in GitHub
Store sensitive credentials as GitHub repository secrets. Then they are never in your code:1
Navigate to Repository Settings
Go to your GitHub repository β Settings β Secrets and variables β Actions
2
Add Repository Secrets
Click New repository secret and add your secrets:
TD_API_KEY- Your TestDriver API keyTD_USERNAME- Test account usernameTD_PASSWORD- Test account password
3
Use in GitHub Actions
Reference secrets in your workflow file:
.github/workflows/test.yml
Local Development
For local development, store secrets in a.env file:
.env
Complete Example
Hereβs a full login test with proper secrets handling:tests/login.test.js
Secrets Best Practices
- Always use
secret: truewhen typing passwords, tokens, or sensitive data - Use environment variables to keep secrets out of code
- Store secrets in your CI provider (GitHub Actions, GitLab CI, etc.)
- Never commit secrets to version control
- Rotate secrets regularly to maintain security

