
"Deterministic transformation tooling was critical for consistency at this scale. Uber's monorepo includes hundreds of thousands of tests integrated with Bazel, which does not natively support JUnit 5."
"To address the challenges of migration, 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."
"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 and convert parameterized test patterns."
Uber engineers migrated over 75,000 test classes and 1.25 million lines of code from JUnit 4 to JUnit 5 using automated tools. The migration aimed to adopt a modern testing framework and reduce technical debt. JUnit 4 has been in maintenance mode since 2021, while JUnit 5 offers a modular architecture and improved testing capabilities. A compatibility layer was created to allow both JUnit versions to run together, enabling incremental migration without workflow disruption. OpenRewrite was used for automated source code changes, ensuring deterministic transformations.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]