Learn how to securely handle authentication workflows in TestDriver using GitHub Actions.
prerun
script and test files. Save these locally in your .env
file and use them in CI as GitHub secrets.
.gitignore
file to your repository including a .env
line so you never accidentally commit you TestDriver API key.
This is important for security and to prevent exposing sensitive information. For more info see GitHub Docs.prerun
script or test files to perform authentication steps.TD_USERNAME
: The username for login.TD_PASSWORD
: The password for login.TD_API_KEY
: Your TestDriver API key.TD_WEBSITE
: The URL of the website to test.secrets
context. They can be supplied as:
env
block.prerun
Script: Used directly in the script.${TD_USERNAME}
and ${TD_PASSWORD}
).
TD_USERNAME
and TD_PASSWORD
are passed as environment variables to the TestDriver action.prerun
Script:TD_WEBSITE
secret is used to launch the browser with the correct URL.***
.prerun
script and test files, you can automate authentication workflows in TestDriver while ensuring sensitive information remains protected.