- Run your tests on every pull request.
- Let the TestDriver agent review each change.
- Ask the agent to fix a test when your app changes.
Tests that adapt to UI changes
A TestDriver test describes elements the way a person would, such as βthe Sign in button in the headerβ. It finds them by looking at the screen. These changes donβt break the test, because the description still matches whatβs on screen:- Restyling a button.
- Moving it.
- Rewriting the markup around it.
Run tests on every pull request
Run your suite in GitHub Actions, so a change that breaks a flow fails its pull request. Thetestdriverai/action step authenticates with GitHub OIDC, so thereβs no API key secret to store. npx testdriverai init writes a workflow like this for you:
.github/workflows/testdriver.yml
Review every pull request
With the TestDriver GitHub app installed, the TestDriver agent reviews each pull request when itβs opened and after every push.- It reads the change for bugs.
- When the change is something a user would see, it runs it in a sandbox to prove what it finds.
Fix a test when your app changes
Sometimes a test fails because the app changed on purpose, such as a renamed button or a reworked flow. Ask the TestDriver agent to update the test. On GitHub, mention it on the pull request or an issue:- Reruns the flow in a sandbox and sees the current screen.
- Updates the test.
- Opens a pull request with the fix for you to review.
When updating a test isnβt enough
Updating a description or an assertion works well when an element is renamed, restyled, or moved. When a flow changes substantially, such as a new step in checkout or a redesigned form, describe the new flow. Have the agent generate a fresh test instead.Next steps
Run tests in CI/CD
Set up GitHub Actions and other CI providers.
The TestDriver agent
How the agent reviews pull requests and fixes tests.
Locate elements
Write descriptions that keep working as your UI changes.
Debug a failing test
See what the screen showed when a test failed.

