How Airbnb Used LLMs to Accelerate Test Migration
Briefly

Airbnb successfully transitioned 3,500 React test files from Enzyme to React Testing Library (RTL) by leveraging workflow automation and large language models (LLMs). They found that repeatedly retrying the conversion was more successful than focusing on prompt engineering. The team adopted a structured migration approach, addressing errors step-by-step and improving their automation pipeline's efficiency. This method allowed for concurrent migrations of hundreds of files, enhancing productivity. Ultimately, their prompts expanded significantly, suggesting a comprehensive integration of contextual information and examples for optimal results.
Thanks to the right mix of workflow automation and large language models, Airbnb significantly accelerated the process of updating their codebase to adopt React Testing Library (RTL) and converted nearly 3.5K React test files originally using Enzyme.
Airbnb engineers broke down the migration process into a number of steps, starting with refactoring Enzyme to RTL, then fixing any errors found in Jest tests, running the linter, and finally, the TypeScript compiler.
Covey-Brandt says that another advantage of this approach was the possibility of running the migration concurrently for hundreds of files at a time.
By the end of the migration, our prompts had expanded to anywhere between 40,000 to 100,000 tokens, pulling in as many as 50 related files.
Read at InfoQ
[
|
]