Uber engineers migrated over 75,000 test classes and 1.25 million lines of code from JUnit 4 to JUnit 5 across their Java monorepo using automated code transformation. The team used OpenRewrite for deterministic source transformations and an internal orchestration system called Shepherd to apply changes across thousands of Bazel targets in parallel. Key challenges included Bazel's lack of native JUnit 5 support (solved via a unified JUnit Platform execution model with Vintage and Jupiter engines) and Uber-specific test patterns requiring custom transformation recipes. Generative AI was evaluated but rejected for inconsistent results. The iterative rollout validated changes through CI pipelines, achieving large-scale migration with minimal manual intervention. The approach is now being extended to Spring Boot 3 and other library migrations.

3m read timeFrom infoq.com
Post cover image

Sort: