This guide explains how to integrate TestDriver with Netlify deployments using the GitHub Actions workflow. By combining these tools, you can automatically test your Netlify preview deployments or production builds to ensure they meet your quality standards before merging or releasing.Documentation Index
Fetch the complete documentation index at: https://docs.testdriver.ai/llms.txt
Use this file to discover all available pages before exploring further.
Workflow overview
- Trigger Netlify Deployment: Use Netlify’s GitHub integration to deploy your application on every pull request or push to the main branch.
- Run Tests on the Deployment URL: Use the TestDriver GitHub Action to test the deployed application using the Netlify deployment URL.
- Report Results: View test results in the GitHub Actions dashboard or as comments on the pull request.
Prerequisites
- Netlify GitHub Integration: Ensure your repository is connected to Netlify for automatic deployments.
- TestDriver API Key: Store your API key as a GitHub secret (for example,
TD_API_KEY). - Netlify Deployment URL: Use the
DEPLOY_URLenvironment variable provided by Netlify to access the deployment.
CI/CD workflow
Here’s a complete workflow to test Netlify deployments with TestDriver CLI (adapt for your CI/CD platform):.github/workflows/testdriver-netlify.yaml
Workflow steps explained
1. Wait for Netlify deployment
Netlify automatically sets theDEPLOY_URL environment variable for each deployment. This step ensures the deployment URL is available before running tests.
.github/workflows/testdriver-netlify.yaml
2. Run tests with TestDriver CLI
The TestDriver CLI runs tests on the deployed application using the deployment URL..github/workflows/testdriver-netlify.yaml

