GitHub Integration with TestDriver
Explore how TestDriver enhances GitHub workflows with branch creation, manual dispatch, and detailed outputs for seamless test management.
TestDriver offers advanced GitHub integration features, including the ability to create its own branches, trigger workflows manually from the GitHub Actions UI, and provide detailed outputs for debugging and reporting. These features make it easier to manage test workflows, collaborate on test results, and maintain a clean and automated testing pipeline.
Always remember to add a .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.
1. Creating branches automatically
TestDriver can create its own branches to store test results, updates, or auto-healed tests. This ensures that test-related changes are isolated from the main codebase and can be reviewed before merging.
How it works
- Branch Creation: TestDriver creates a new branch (for example,
test-results
orauto-heal-updates
) during the workflow execution. - Pull Request: A pull request is automatically opened from the new branch to the base branch (for example,
main
), allowing developers to review the changes.
Example workflow with branch creation
Key fields
create-pr: true
: Enables branch creation and pull request generation.pr-branch
: Specifies the branch name (for example,test-results
).pr-title
: Sets the title of the pull request.pr-test-filename
: Specifies the filename for the test results.
2. Manual workflow dispatch
GitHub Actions supports manual triggering of workflows using the workflow_dispatch event. This allows you to run TestDriver workflows on demand, making it ideal for exploratory testing or debugging.
How to trigger workflows manually
- Navigate to the Actions tab in your GitHub repository.
- Select the workflow you want to run.
- Click the Run workflow button.
- Provide any required inputs (if applicable) and confirm.
Example workflow with manual dispatch
Run Steps
Benefits of manual dispatch
- Exploratory Testing: Run tests on demand for specific scenarios.
- Debugging: Trigger workflows to debug issues without waiting for automated triggers.
- Flexibility: Test changes in feature branches or experimental setups.
3. GitHub Actions output
TestDriver provides detailed outputs during workflow execution, which are visible in the Actions tab of your repository. These outputs include:
- Test Summary: A high-level overview of the test results.
- Logs: Step-by-step logs of the test execution.
- Screenshots and GIFs: Visual feedback for debugging.
- Links to TestDriver Dashcam.io Replays: Direct links to detailed test recordings and results.
Example outputs
Test summary
- ✅ All tests passed.
- ❌ 2 tests failed.
TestDriver Replay
Using Outputs in Workflows
You can capture and use TestDriver outputs in subsequent steps of your workflow. For example, you can post the test summary as a comment on a pull request.
Example
Summary of Features
- Branch Creation: Automatically create branches for test results or auto-healed tests.
- Manual Dispatch: Trigger workflows on demand from the GitHub Actions UI.
- Detailed Outputs: Access logs, summaries, and visual feedback directly in the Actions tab.
These features make TestDriver a powerful tool for managing automated testing workflows in GitHub, enabling better collaboration, debugging, and test management.