Agents Lookup

Use cases / Software development

Migrate thousands of tests to a new test framework

An LLM pipeline rewrites test files file by file, retries with error feedback, and leaves hard cases for engineers to finish.

DifficultyAdvanced
Setup time1-2 weeks
CategorySoftware development

The use case

Old test frameworks linger because rewriting thousands of files by hand is slow. Airbnb wrote about moving its React tests from Enzyme to React Testing Library with an LLM pipeline. Each file went through stages: migrate, then fix lint, type and test failures by feeding errors back to the model, with retries and richer context for stubborn files. Most files were done automatically and the remainder were finished by engineers. The pattern applies to any mechanical migration with a test suite as the check. Engineers still review migrated tests to make sure they test the same behavior, not just pass.

Example workflow

  1. Define the target pattern and collect example migrations
  2. Run each file through migrate, lint, typecheck and test stages
  3. Feed failures back to the model and retry with more context
  4. Send files that still fail to engineers
  5. Review a sample of passing files for weakened assertions

Tools

Risks and guardrails

Sources

Written by Agents Lookup. Credits and official pages for the tools this use case names: