Engineering
Airbnb: migrate a test suite
Move thousands of test files to a new framework, with each file verified by its own passing tests.
By OneShot · Updated
- test files migrated
- ~3,500
- Airbnb’s first estimate by hand
- 1.5 years
- Airbnb’s reported time to finish
- 6 weeks
- to migrate 75% of the test files
- 4 hours
The documented problem
Airbnb first estimated that migrating nearly 3,500 component test files by hand would take 1.5 years of engineering time.
What Airbnb has published 1 source
Airbnb’s engineering blog describes migrating nearly 3,500 React component test files from Enzyme to React Testing Library. The team first estimated the work at 1.5 years of engineering time by hand.
Using large language models and an automated pipeline, Airbnb reports finishing in six weeks: 75% of the files migrated in four hours, 97% after four days of tuning prompts and scripts, and the remainder fixed manually. These are Airbnb’s results from its own tooling. The OneShot workflow below coordinates migration, validation and review.
The OneShot solution
Move every in-scope test file to the new framework with its tests passing and its original intent preserved.
An approved migration plan, a batch of files ready to convert or a file that has used up its retries.
Sample and set the rules
Convert a small sample first. Agree with the migration lead what passing means: the file’s tests run green, lint and type checks pass, and no test is deleted or skipped to get there.
- Source repositories and CI
Convert file by file
The OneShot agent converts each file and runs its tests. A file moves forward only when every check passes; the result and the checks run are recorded per file.
- Source repositories and CI
Retry with more context
For a failing file, retry with the error output, the component under test and neighbouring tests as context, up to the agreed attempt limit and budget. Stop when further attempts stop making progress.
- Source repositories and CI
Hand off the hard tail
Assign engineers the files that still fail on the goal’s request page, with the best attempt and its errors attached. Open converted batches for review and track them to merge.
- Source repositories and CI
What the workflow produces
Test migration ledger- File status
- Checks
- Attempts
- Hand-off
- Pays back
- Engineering time on the test migrationSix weeks against 1.5 years by hand
- Decided by
- Migration lead
- Done when
- Every in-scope file is merged with passing tests, or assigned to a named engineer with the last attempt attached.
Where a person decides
A conversion that deletes, skips or weakens a test is rejected even if the file passes.
Files that use up their attempts go to an engineer; the agent does not keep spending.
Merging follows the owning team’s normal review.
What to measure
- Share of files passing automatically
- Attempts per file
- Files handed to engineers
- Coverage before and after
The agent’s tools
- Source repositories and CI
Live toolConnection to your systems
What each connection does
- Source repositories and CI
- Read in-scope repositories, open pull requests and read build and test results for each change.
Workflow pricing
Scope the full workflow around your volume, business systems and required outcome.
Discuss workflow pricing →