Learn how to leverage GitHub Actions’ matrix strategy to run TestDriver tests in parallel, reducing execution time and improving scalability.
testdriver/acceptance/
) and follow a consistent naming convention (for example, login.yaml
, signup.yaml
, etc.).Define the GitHub Action Workflow
gather-test-files
Job:
testdriver/acceptance/
directory.basename
to get just the filenames without the full path.run-tests
Job:
npx testdriverai@latest
with the --headless
flag.max-parallel
setting limits the number of tests that can run in parallel to 8
(the max instances for the Medium Team Plan).matrix.test
variable represents each test filename.testdriver/acceptance/
directory.TD_API_KEY
: Your TestDriver API key for authentication.TD_WEBSITE
: The target website URL for testing.TD_THIS_FILE
: The current test file being executed.false
to ensure all tests run even if one fails.testdriver/acceptance/
(for example, login.yaml
, signup.yaml
) is executed in its own job.fail-fast: true
only if you want to stop all tests when one fails.