Skip to content

Deprecated JUnit4 #4835

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Coen90
Copy link

@Coen90 Coen90 commented May 7, 2025

This PR primarily focuses on reflecting the deprecation of JUnit 4 within the Spring Batch project.

Here's a breakdown of the changes:

  • Documentation Update (testing.adoc):

    • A note has been added to the testing documentation explicitly stating that Spring Batch no longer supports JUnit 4 and recommends users migrate to JUnit Jupiter.
  • Javadoc Updates in Test Listeners (JobScopeTestExecutionListener.java, StepScopeTestExecutionListener.java):

    • The example usage in the Javadoc for both JobScopeTestExecutionListener and StepScopeTestExecutionListener has been modified.
    • The @RunWith(SpringJUnit4ClassRunner.class) annotation, specific to JUnit 4, has been removed from these examples.
    • The @SpringJUnitConfig annotation, which is typically used with JUnit 5, has been added to these examples.
  • Javadoc and Example Removal in SpringBatchTest.java:

    • The detailed Javadoc example demonstrating how to use @SpringBatchTest with JUnit 4 has been removed.
    • A clear statement has been added to the Javadoc for the @SpringBatchTest annotation, indicating that "JUnit4 is deprecated in Spring Batch 6.0.0 and will be removed in a future release."

In essence, these changes remove JUnit 4 specific examples and guidance, update documentation to reflect its deprecation, and point towards JUnit 5 (Jupiter) as the recommended testing framework.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant