Slack's AI-Powered, Hybrid Approach for Large-Scale Migration from Enzyme to React Testing Library

With the Enzyme test framework no longer supporting React 18, migrating to React Testing Library (RTL) became imperative.

At Slack, our hybrid approach integrated an Abstract Syntax Tree (AST) method and a Large Language Model (LLM) using Anthropic's AI model, Claude 2.1. Despite initial hurdles, we achieved an 80% conversion success rate.

Key innovations included AST conversions and annotations, DOM tree collection, stringent control mechanisms, and packaging all information into a cohesive pipeline with LLM call and feedback steps. This resulted in a 64% adoption rate and a 22% time-saving in test case conversion.

This success underscores the value of AI in large-scale code migrations and establishes a robust, innovative approach for similar challenges.


Speaker

Sergii Gorbachov

Senior Software Engineer @Slack

Sergii Gorbachov is a Senior Software Engineer at Slack, based in Vancouver, Canada. As part of the DevXp pillar, he focuses on developing AI-driven tools to automate and streamline development processes. His recent projects include leveraging large language models (LLMs) for code migrations and automating test authorship. Outside of work, Sergii enjoys hiking, running, and biking in the stunning landscapes of British Columbia.

Read more
Find Sergii Gorbachov at:

From the same track

Session

Optimizing Search at Uber Eats

Uber has an in-house search engine called Search In Action (SIA). As the backbone behind the feed and search capabilities of Uber's Delivery business, SIA plays a crucial role in expanding selection seamlessly for customers which is a strategic advantage to the business.

Speaker image - Janani Narayanan

Janani Narayanan

Senior Staff Engineer @Uber

Speaker image - Karthik Ramasamy

Karthik Ramasamy

Senior Staff Software Engineer @Uber

Session

Supporting Diverse ML Systems at Netflix

Netflix uses data science and machine learning across all facets of the company, powering a wide range of business applications.

Speaker image - David Berg

David Berg

Senior Software Engineer @Netflix

Speaker image - Romain  Cledat

Romain Cledat

Senior Software Engineer @Netflix