openrewrite / openrewrite/rewrite-testing-frameworks
JUnit 4 to 5: use @ParameterizedClass when converting parameterized tests
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 100
- Forks
- 105
- Avg merge
- 2h 25m
- Merged PRs (30d)
- 9
Description
What problem are you trying to solve?
JUnit 5.13 introduced @ParameterizedClass which is much closer to JUnit 4 semantics, so rewrite won't need extra init methods.
Recent Java versions could even use @ParameterizedClass record, however, it might be harder to implement.
Describe the solution you'd like
Use @ParameterizedClass instead of @ParameterizedTest.
Additional context
Are you interested in contributing this feature to OpenRewrite?
I might contribute
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the JUnit 5.13 documentation for @ParameterizedClass and the linked section on consuming arguments. Then inspect the existing JUnit 4 parameterized-test conversion entry points and their tests. Done means conversions use @ParameterizedClass rather than @ParameterizedTest while preserving JUnit 4 semantics; record support is optional context, not a defined requirement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100