Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reproduce and investigate flakiness in a test.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 110% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 49% | 0% |
This skill outlines the workflow for reproducing and fixing a flaky test in the DevTools codebase. The work should be divided into sub-agents that should only be started when certain criteria are met.
crbug.com/1234567), or a name of a test file and (optionally) the test name.I will attempt to reproduce the flakiness (simultaneously) locally and using the 'stressor bots'. Once issues are discovered, I will attempt to fix them.First, create and start two sub-agents simultaneously. One called 'local-repro' (that should attempt to reproduce the problem locally) and one called 'bot-repro' (that attempts to use the stressor bots to reproduce).
npm run test -- --repeat=<count> path/to/foo.test.ts:exact_test_id to locally run the tests repeatedly. Both E2E and unit tests support this. Use the exact test ID printed in the test runner output (usually the suite and test names with spaces replaced by underscores). Do not use --grep or a bash script with a for loop.Test: Runs Sec Failures
"Recorder/should be able to start a replay..." 30 180 0 (0.00%)
"The Debugger Language Plugins/shows sensible..." 60 180 1 (1.67%)If problems were detected, list the different problems found and how often they occurred. Ask the user if the errors match the ones they are trying to get rid of.
The second bot should do the following:
deflake_<test_name>.devtools-version-control skill to create and switch branches appropriately.// Trigger stressor bot) to ensure the commit is not empty.git add) and commit it using a meaningful commit message (e.g., git commit -m "Deflake <test name>"). Ask the user which bug number to use for the changelist description.git cl upload -f. Always use -f (--force) so the upload runs non-interactively without opening a text editor or prompt. This creates a debugging CL that all agents (like the fix agent) will continue to work on.<test file>:exact_test_id with the actual file and exact test ID):git cl try -B devtools-frontend/try -b e2e_stressor_linux -b e2e_stressor_win64 -b e2e_stressor_mac -p runner_args='<test file>:exact_test_id --repeat=100'
assertScreenshot), it should ONLY be run on the Linux stressor bot (-b e2e_stressor_linux), because screenshot assertions are not supported on Mac or Windows. Furthermore, they cannot be reproduced locally on a Mac.git cl try fails with a login error (e.g., Login required: run bb auth-login), inform the user so they can resolve the auth issue and ask you to retry.test/e2e/foo.test.ts instead of e2e/foo.test.ts.git cl try-results --issue=<issue number> --patchset=<patchset number>. You can dive into each result by id using bb get <id>.git cl try or incorrect test IDs).While we wait for the bots to complete their run, would you like to:
1) Continue trying to reproduce locally
2) Start investigating the testIf they opt for investigating the test, start a new agent called 'fix-test'.
The test fixing sub-agent should do the following:
git cl upload -f.Other measured skills in the registry, with their headline benchmark lift.