Search code examples
junitspring-testjunit3

Does the Spring testing framework support JUnit 3?


Does the Spring testing framework support JUnit 3?

There is no information on what version of Spring testing framework supports JUnit version 3.

And from what version is only JUnit 4 supported?


Solution

  • JUnit 3

    The Spring Framework had support for JUnit 3.8 from Spring Framework 1.1.1 through 3.2.x.

    JUnit 3.8 support was removed in Spring Framework 4.0.

    JUnit 4

    The Spring Framework has had support for JUnit 4.x since Spring Framework 2.5. That support still exists.

    As of Spring Framework 4.3, JUnit 4.12 or higher is required. For other minimum JUnit 4 version requirements, check the documentation of the version of Spring that you are using.

    JUnit 5

    Spring Framework 5.0 introduced support for JUnit Jupiter (a.k.a., JUnit 5).

    Consult the Testing chapter in the Spring Reference Manual for further details.