Fixing and generating tests work with TypeScript Playwright tests only. On a pytest suite the button still appears, but the job won’t produce a fix.
Start a fix
1
Open the failed run
Open the failed run from the test case’s page. Read the failure analysis first: if it points at a bug in your app, the test is doing its job and there’s nothing to heal.
2
Check the branch
The heal card on the run page says which branch the fix opens against: the branch the run failed on, when Peeps follows it, and otherwise the headline branch.
3
Click Heal in your repository
Peeps starts a job in your CI. The card shows its progress, then the outcome.
/peeps heal ABC-12 on an issue or pull request, using the test case’s id. A fix started that way opens against the headline branch, and Peeps replies in the same thread with the outcome.
What happens in your CI
Peeps starts the Peeps workflow on that branch, inagent mode, and works in that job:
- It reads the failure and the code: the error, where it was thrown, the test file and the page objects and fixtures it uses, as they are now on that branch.
- It changes the test where the breakage is. That’s often a page object rather than the test itself. It’s instructed never to skip the test, loosen an assertion, or add a fixed wait just to get a pass. Review the diff as you would any pull request.
- It re-runs the test on your runner, in the same Playwright project the failure ran in. Only a fix that passes there goes any further.
- It opens a pull request from a
peeps/fix-…branch into the branch the card named. The title says what kind of fix it is, such as Fix locator: followed by the test’s title, and the description lists the files it changed and the commit it started from. It’s a draft if you set Healed fixes arrive as to Draft pull request.
Outcomes
The card on the run page, and the Peeps on your runner card on the test case, end with one of these:
Peeps heals one test at a time: while a fix for a test is running, you can’t start another for the same test.