Getting Started
Running in GitHub Actions
Learn how to set up and run tests with TestDriver using GitHub Actions for seamless end-to-end testing.
This guide explains how to set up a basic GitHub Actions workflow to run tests using TestDriver.
Prerequisites
- TestDriver API Key: Obtain your API key from TestDriver and store it as a GitHub secret (for example,
TD_API_KEY
). - Test Files: Ensure your test files are saved in the
testdriver/
directory of your repository.
Create a GitHub Actions workflow
- Create a new file in your repository:
.github/workflows/testdriver.yaml
. - Add the following workflow configuration:
Example workflow
.github/workflows/testdriver.yaml
Trigger the workflow
- Push changes to the
main
branch or open a pull request. - Alternatively, manually trigger the workflow from the Actions tab in your GitHub repository.
View results
- Navigate to the Actions tab in your GitHub repository.
- Select the workflow run to view the test results.
Debugging tests
TestDriver provides a powerful debugging interface through its app.TestDriver platform (formerly Dashcam). This interface allows you to analyze test runs, identify failures, and optimize your test suite with detailed visual and textual feedback.
1. Step-by-step execution logs
- View each step of the test execution, including:
- The action performed (for example, clicking a button, typing text).
- The expected outcome (for example, verifying a specific element is visible).
- The result (pass, fail, or skipped).
- Logs provide detailed context for each step, making it easier to pinpoint where and why a test failed.
2. Visual feedback
- Screenshots: See what the application looked like at each step of the test.
- GIF Previews: Watch a replay of the entire test execution to understand the flow and identify UI issues.
- Highlighting: Elements interacted with during the test are highlighted in screenshots, helping you verify that the correct elements were targeted.
3. Error details
- For failed steps, app.TestDriver provides:
- Error messages: Detailed descriptions of what went wrong (for example, “Element not found”).
- Stack traces: For advanced debugging of backend or script-related issues.
- Suggestions: Recommendations for fixing common issues, such as adjusting prompts or improving element descriptions.
4. Test history
- Access the history of test runs to:
- Compare results across different builds or environments.
- Identify flaky tests by analyzing patterns in failures.
- Track improvements or regressions over time.
5. Environment context
- View the environment details for each test run, including:
- Operating system and browser version.
- Screen resolution and viewport size.
- Network conditions (if applicable).
6. Collaboration tools
- Share test results with your team by generating a shareable link.
- Add comments or annotations to specific steps to facilitate discussions and debugging.