Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation

- Uber开发了自动化工具完成大规模JUnit 4到JUnit 5的迁移。
- 迁移过程注重兼容性,确保新旧版本无缝切换。
- 案例为其他企业提供了大规模测试框架升级的参考。
Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation - InfoQ
[BT](http://www.infoq.com/int/bt/ "bt")
InfoQ Software Architects' Newsletter
A monthly overview of things you need to know as an architect or aspiring architect.
Enter your e-mail address
Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.
Close
Live Webinar and Q&A: Designing Data Layers for Agentic AI: Patterns for State, Memory, and Coordination at Scale (May 12, 2026)Save Your Seat
Close
Toggle Navigation
Facilitating the Spread of Knowledge and Innovation in Professional Software Development
English edition
[Write for InfoQ](http://www.infoq.com/write-for-infoq/ "Write for InfoQ")
Search
Unlock the full InfoQ experience
Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.
or
Don't have an InfoQ account?
- **Stay updated on topics and peers that matter to you**Receive instant alerts on the latest insights and trends.
- **Quickly access free resources for continuous learning**Minibooks, videos with transcripts, and training materials.
- **Save articles and read at anytime**Bookmark articles to read whenever youre ready.
NewsArticlesPresentationsPodcastsGuides
Topics
[Development](http://www.infoq.com/development/ "Development")
- [Java](http://www.infoq.com/java/ "Java")
- [Kotlin](http://www.infoq.com/kotlin/ "Kotlin")
- [.Net](http://www.infoq.com/dotnet/ ".Net")
- [C#](http://www.infoq.com/c_sharp/ "C#")
- [Swift](http://www.infoq.com/swift/ "Swift")
- [Go](http://www.infoq.com/golang/ "Go")
- [Rust](http://www.infoq.com/rust/ "Rust")
- [JavaScript](http://www.infoq.com/javascript/ "JavaScript")
Featured in Development
Dany Lepage discusses the architectural journey of porting a hit VR title to seven non-VR platforms. He explains how his team solved the challenges of cross-progression, diverse input paradigms, and maintaining release velocity across Steam, iOS, and PlayStation. Beyond the tech, he shares candid lessons on the "product fit" gap when translating immersive social presence to 2D screens.

All in developmentFollow Topic
[Architecture & Design](http://www.infoq.com/architecture-design/ "Architecture & Design")
- [Architecture](http://www.infoq.com/architecture/ "Architecture")
- [Enterprise Architecture](http://www.infoq.com/enterprise-architecture/ "Enterprise Architecture")
- [Scalability/Performance](http://www.infoq.com/performance-scalability/ "Scalability/Performance")
- [Design](http://www.infoq.com/design/ "Design")
- [Case Studies](http://www.infoq.com/Case_Study/ "Case Studies")
- [Microservices](http://www.infoq.com/microservices/ "Microservices")
- [Service Mesh](http://www.infoq.com/servicemesh/ "Service Mesh")
- [Patterns](http://www.infoq.com/DesignPattern/ "Patterns")
- [Security](http://www.infoq.com/Security/ "Security")
Featured in Architecture & Design
Frank Yu shares Coinbase’s engineering philosophy for building resilient, fair, and fast financial exchanges. He explains the power of a single-threaded architecture combined with the Raft consensus algorithm to maintain 24/7 availability. He discusses how determinism enables zero-downtime rolling deployments and the ability to replay production logs for perfect bug reproduction.

All in architecture-designFollow Topic
[AI Infrastructure](http://www.infoq.com/ai-ml-data-eng/ "AI Infrastructure")
- [Big Data](http://www.infoq.com/bigdata/ "Big Data")
- [Machine Learning](http://www.infoq.com/machinelearning/ "Machine Learning")
- [NoSQL](http://www.infoq.com/nosql/ "NoSQL")
- [Database](http://www.infoq.com/database/ "Database")
- [Data Analytics](http://www.infoq.com/data-analytics/ "Data Analytics")
- [Streaming](http://www.infoq.com/streaming/ "Streaming")
Featured in AI, ML & Data Engineering
Shuman Ghosemajumder explains how generative AI has transformed from a creative curiosity into a high-scale tool for disinformation and fraud. He shares insights on "Disinformation Automation," the fallacy of CAPTCHA in an AI world, and why engineering leaders must adopt zero-trust "cyber fusion" strategies to defend against automated attacks that mimic human behavior with chilling accuracy.

All in ai-ml-data-engFollow Topic
[Culture & Methods](http://www.infoq.com/culture-methods/ "Culture & Methods")
- [Agile](http://www.infoq.com/agile/ "Agile")
- [Diversity](http://www.infoq.com/diversity/ "Diversity")
- [Leadership](http://www.infoq.com/leadership/ "Leadership")
- [Lean/Kanban](http://www.infoq.com/lean/ "Lean/Kanban")
- [Personal Growth](http://www.infoq.com/personal-growth/ "Personal Growth")
- [Scrum](http://www.infoq.com/scrum/ "Scrum")
- [Sociocracy](http://www.infoq.com/sociocracy/ "Sociocracy")
- [Software Craftmanship](http://www.infoq.com/software_craftsmanship/ "Software Craftmanship")
- [Team Collaboration](http://www.infoq.com/team-collaboration/ "Team Collaboration")
- [Testing](http://www.infoq.com/testing/ "Testing")
- [UX](http://www.infoq.com/ux/ "UX")
Featured in Culture & Methods
The panelists share insights on evolving company culture. They discuss leveraging feedback loops, lending social capital, and the friction between legacy bureaucracy and agile engineering. The panel explains how to maintain cohesion in remote teams and use interviews to uncover the true "unmanicured" culture of a firm.

All in culture-methodsFollow Topic
- [Infrastructure](http://www.infoq.com/infrastructure/ "Infrastructure")
- [Continuous Delivery](http://www.infoq.com/continuous_delivery/ "Continuous Delivery")
- [Automation](http://www.infoq.com/automation/ "Automation")
- [Containers](http://www.infoq.com/containers/ "Containers")
- [Cloud](http://www.infoq.com/cloud-computing/ "Cloud")
- [Observability](http://www.infoq.com/observability/ "Observability")
Featured in DevOps
Wayne Bell and Dan Gomez Blanco discuss the architectural and cultural shift required to scale observability at Skyscanner. They share how moving to OpenTelemetry decoupled instrumentation from vendors, and explain why treating a platform as a product - with engineers as customers - is the key to reducing incident rates and eliminating technical debt across 800+ microservices.

All in devopsFollow Topic
[Events](https://events.infoq.com/ "Events")
Helpful links
- [About InfoQ](http://www.infoq.com/about-infoq "About InfoQ")
- [InfoQ Editors](http://www.infoq.com/infoq-editors "InfoQ Editors")
- [Write for InfoQ](http://www.infoq.com/write-for-infoq "Write for InfoQ")
- [About C4Media](https://c4media.com/ "About C4Media")
- [Diversity](https://c4media.com/diversity "Diversity")
Choose your language

[InfoQ Homepage](http://www.infoq.com/ "InfoQ Homepage")[News](http://www.infoq.com/news "News")Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation
[Architecture & Design](http://www.infoq.com/architecture-design/ "Architecture & Design")
Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation
Apr 27, 2026 2 min read
by
- Leela Kumili
Follow Lead Engineer
#### Write for InfoQ
**Feed your curiosity.**Help 550k+ global
senior developers
each month stay ahead.Get in touch
Log in to listen to this article
Loading audio
Your browser does not support the audio element.
0:00 0:00
Normal 1.25x 1.5x
Like
Uber engineers migrated more than 75,000 test classes and over 1.25 million lines of code from JUnit 4 to JUnit 5 across their Java monorepo using automated code transformation and orchestration tooling. The migration was driven by the need to adopt a modern testing framework with improved extensibility and to reduce technical debt associated with a legacy system in maintenance mode.
JUnit 4 has been in maintenance mode since 2021, while JUnit 5 introduces a modular architecture built on the JUnit Platform with support for the Jupiter engine and improved parameterized testing. For Uber, continuing with JUnit 4 limited access to newer capabilities made migration necessary despite the complexity introduced by scale and infrastructure constraints.
Anshuman Mishra and Kaushik Vejju of Uber noted,
Deterministic transformation tooling was critical for consistency at this scale.
Uber engineers noted that generative AI produced inconsistent results across custom test patterns. Uber’s monorepo includes hundreds of thousands of tests integrated with Bazel, which does not natively support JUnit 5. To address this, engineers first enabled a unified execution model using the JUnit Platform, allowing both JUnit 4 and JUnit 5 tests to run together via the Vintage and Jupiter engines. This compatibility layer ensured that migration could proceed incrementally without disrupting existing workflows.
!Image 13/filters:no_upscale()/news/2026/04/uber-junit4-junit5-migration/en/resources/1junit5-1776546985000.jpeg)
_Enabling JUnit 5 support for Bazel (Source: Uber Blog Post)_
With the execution foundation in place, Uber adopted OpenRewrite to automate source code changes. OpenRewrite operates on a semantic representation of code, enabling deterministic transformations from JUnit 4 APIs to JUnit 5 equivalents. Engineers defined transformation recipes to update annotations, replace legacy rules, and convert parameterized test patterns to JUnit Jupiter constructs.
To support internal testing patterns, the team extended these recipes with custom transformations targeting Uber-specific test runners and base classes. Precondition checks were introduced to avoid partially migrated test files and ensure that unsupported patterns were excluded from automated updates. Engineers also analyzed usage patterns across the codebase to prioritize high-frequency constructs, improving automation coverage and efficiency.
Execution at scale was managed through an internal orchestration system called Shepherd, which applied transformations across thousands of Bazel targets in parallel. Shepherd generated code diffs and validated them through continuous integration pipelines, including unit and integration test execution, ensuring behavioral correctness before changes were accepted.
!Image 14/filters:no_upscale()/news/2026/04/uber-junit4-junit5-migration/en/resources/1Screenshot%202026-04-18%20at%201.46.18%E2%80%AFPM-1776546985000.png)
_Automated diff generation through Shepherd (Source: Uber Blog Post)_
The migration followed an iterative rollout model. Initial runs surfaced build and test failures, which informed updates to the transformation logic. Over successive iterations, automation coverage improved, enabling larger portions of the codebase to be migrated with minimal manual intervention.
Uber engineers said the migration established a foundation for large-scale transformations using OpenRewrite. Ongoing efforts include integrating it into Bazel for Spring Boot 3 builds and migrating Guava to standard Java APIs and Joda-Time to java.time.
About the Author

#### **Leela Kumili**
Leela is a Lead Software Engineer at Starbucks with deep expertise in building scalable, cloud-native systems and distributed platforms. She drives architecture, delivery, and operational excellence across the Rewards Platform, leading efforts to modernize systems, improve scalability, and enhance reliability. In addition to her technical leadership, Leela serves as an AI Champion for the organization, identifying opportunities to improve developer productivity and workflows using LLM-based tools and establishing best practices for AI adoption. She is passionate about building production-ready systems, enhancing developer experience, and mentoring engineers to grow in both technical and strategic impact. Her interests include platform engineering, distributed systems, developer productivity, and bridging technical solutions with business and product goals.
Show more Show less
#### This content is in the Productivity topic
Follow Topic
##### Related Topics:
Followers: 4091
Follow Topic
Followers: 10213
Follow Topic
Followers: 5880
Follow Topic
Followers: 0
Follow Topic
Followers: 19
Follow Topic
Followers: 59
Follow Topic
Followers: 11
Follow Topic
Followers: 11
Follow Topic
Followers: 61
Follow Topic
Followers: 90
Follow Topic
Followers: 12
Follow Topic
Followers: 2
Follow Topic
Followers: 22
Follow Topic
Followers: 0
Follow Topic
* #### Popular in Architecture & Design
* #### Related Sponsors
- #### Related Sponsor
**Drop in Ably AI Transport.**
Purpose-built infrastructure for the entire agent-to-user experience. **Start building.**
Related Content
Apr 23, 2026
Apr 12, 2026
- ##### Anthropic Releases Claude Mythos Preview with Cybersecurity Capabilities but Withholds Public Access
Apr 13, 2026
Apr 06, 2026
Apr 13, 2026 
Apr 08, 2026 
Apr 21, 2026
Apr 20, 2026
Apr 16, 2026
Related Sponsors
- #### Stateful agents, stateful infra: The transport gap AI teams are patching by hand
Every AI team hits the same wall and builds the same workaround. That's not a you problem. It's a missing layer. Read Now.
- #### Does your AI stack need a session layer? A maturity framework for teams building AI agents
Explore the missing “session layer” in the AI stack—where many production failures originate. This framework outlines maturity stages for delivering continuous, stateful AI experiences, from fragile HTTP streaming to resilient, multi-device, real-time systems with durable sessions. Read Now.
- Sponsored by

Related Content
Apr 27, 2026 
Apr 02, 2026
Feb 23, 2026 
Feb 12, 2026 
Feb 09, 2026 
Feb 03, 2026 
**The InfoQ** Newsletter
A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example
Enter your e-mail address
Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.
- ##### [QCon San Francisco 2026: 12 Tracks Announced](http://www.infoq.com/news/2026/04/qconsf-2026-tracks-announced/ "QCon San Francisco 2026: 12 Tracks Announced")
- ##### [Microsoft's Russinovich and Hanselman Warn AI Is Hollowing Out the Junior Developer Pipeline](http://www.infoq.com/news/2026/04/junior-developer-pipeline-crisis/ "Microsoft's Russinovich and Hanselman Warn AI Is Hollowing Out the Junior Developer Pipeline")
- ##### [C++26: Reflection, Memory Safety, Contracts, and a New Async Model](http://www.infoq.com/news/2026/04/cpp-26-reflection-safety-async/ "C++26: Reflection, Memory Safety, Contracts, and a New Async Model")
- ##### [Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation](http://www.infoq.com/news/2026/04/uber-junit4-junit5-migration/ "Uber Migrates 75,000+ Test Classes from Junit 4 to Junit 5 Using Automated Code Transformation")
- ##### [How to Build an Exchange: Sub Millisecond Response Times and 24/7 Uptimes in the Cloud](http://www.infoq.com/presentations/exchange-systems-cloud/ "How to Build an Exchange: Sub Millisecond Response Times and 24/7 Uptimes in the Cloud")
- ##### [Dropbox Collaborates with GitHub to Reduce Monorepo Size from 87GB to 20GB](http://www.infoq.com/news/2026/04/dropbox-reduces-git-optimization/ "Dropbox Collaborates with GitHub to Reduce Monorepo Size from 87GB to 20GB")
- ##### [How Observability and Telemetry Can Enhance the Practice of Software Engineering](http://www.infoq.com/news/2026/04/observability-telemetry/ "How Observability and Telemetry Can Enhance the Practice of Software Engineering")
- ##### [Panel: Building a Culture that Works](http://www.infoq.com/presentations/panel-positive-culture/ "Panel: Building a Culture that Works")
- ##### [Platform as a Product: Delivering Value While Balancing Competing Priorities](http://www.infoq.com/news/2026/04/platform-product-deliver-value/ "Platform as a Product: Delivering Value While Balancing Competing Priorities")
- ##### [Deepfakes, Disinformation, and AI Content are Taking over the Internet](http://www.infoq.com/presentations/deepfakes-ai/ "Deepfakes, Disinformation, and AI Content are Taking over the Internet")
- ##### [Orchestrating Agentic and Multimodal AI Pipelines with Apache Camel](http://www.infoq.com/articles/orchestrating-agentic-multimodal-ai-pipelines-apache-camel/ "Orchestrating Agentic and Multimodal AI Pipelines with Apache Camel")
- ##### [Dynamic Moments: Weaving LLMs into Deep Personalization at DoorDash](http://www.infoq.com/presentations/llm-personalization/ "Dynamic Moments: Weaving LLMs into Deep Personalization at DoorDash")
- ##### [Building a Future-Proof Observability Platform to Empower Engineers](http://www.infoq.com/presentations/OpenTelemetry-instrumentation/ "Building a Future-Proof Observability Platform to Empower Engineers")
- ##### [GitLab Adds Flat-Rate Code Reviews, Free-Tier AI Access, and Spending Caps](http://www.infoq.com/news/2026/04/gitlab-flatrate-view-ai-access/ "GitLab Adds Flat-Rate Code Reviews, Free-Tier AI Access, and Spending Caps")
- ##### [Yelp Achieves Zero-Downtime Upgrade of over 1,000 Cassandra Nodes](http://www.infoq.com/news/2026/04/yelp-cassandra-upgrade/ "Yelp Achieves Zero-Downtime Upgrade of over 1,000 Cassandra Nodes")
**The InfoQ** Newsletter
A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example
- Get a quick overview of content published on a variety of innovator and early adopter technologies
- Learn what you don’t know that you don’t know
- Stay up to date with the latest information from the topics you are interested in
Enter your e-mail address
Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.
[Home](http://www.infoq.com/ "Home")[Create account](http://www.infoq.com/reginit.action "Create account")Log In[QCon Conferences](http://qconferences.com/ "QCon Conferences")Events[Write for InfoQ](http://www.infoq.com/write-for-infoq/ "Write for InfoQ")[InfoQ Editors](http://www.infoq.com/infoq-editors/ "InfoQ Editors")[About InfoQ](http://www.infoq.com/about-infoq/ "About InfoQ")[About C4Media](https://c4media.com/ "About C4Media")[Media Kit](https://get.infoq.com/infoq-mediakit/ "Media Kit")[InfoQ Developer Marketing Blog](https://devmarketing.c4media.com/?utm_source=infoq "InfoQ Developer Marketing Blog")[Diversity](https://c4media.com/diversity "Diversity")
#### Events
May 7, 2026
- ##### QCon AI Boston
June 1-2, 2026
June 10, 2026
- ##### QCon San Francisco
November 16-20, 2026
#### Follow us on
Youtube 232K FollowersLinkedin 26K FollowersInstagram NewRSS 19K ReadersX 57.1k FollowersFacebook 21K LikesBluesky New
#### Stay in the know
The InfoQ PodcastEngineering Culture PodcastThe Software Architects' Newsletter
General Feedback [feedback@infoq.com](mailto:feedback@infoq.com) Advertising [sales@infoq.com](mailto:sales@infoq.com) Editorial [editors@infoq.com](mailto:editors@infoq.com) Marketing [marketing@infoq.com](mailto:marketing@infoq.com)
InfoQ.com and all content copyright © 2006-2026 C4Media Inc.
Privacy Notice, Terms And Conditions, Cookie Policy
Close
[BT](http://www.infoq.com/int/bt/ "bt")