Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Introduce support for JUnit 5 in the TestContext framework [SPR-13575] #18151

Closed
16 tasks done
spring-projects-issues opened this issue Oct 15, 2015 · 3 comments
Closed
16 tasks done

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 15, 2015

Juergen Hoeller opened SPR-13575 and commented

Work in Progress

The current work for supporting JUnit 5 in the Spring TestContext Framework can be seen in the spring-test-junit5 repository.

Feedback is Welcome

Developers are encouraged to try out the SpringExtension and provide feedback!

Deliverables

  1. Introduce a SpringExtension to be configured via @ExtendWith(SpringExtension.class) (analogous to @RunWith(SpringRunner.class) for JUnit 4)
  2. Implement ParameterResolver
  3. Implement BeforeAllCallback
  4. Implement AfterAllCallback
  5. Implement TestInstancePostProcessor
  6. Implement BeforeEachCallback
  7. Implement AfterEachCallback
  8. Implement BeforeTestExecutionCallback and AfterTestExecutionCallback
  9. Delete custom MethodParameterFactory
  10. Migrate to ExecutionContext.Store
  11. Provide the test exception to TestContextManager.afterTestMethod()

Reference URL: https://github.com/junit-team/junit5

Issue Links:

  • #9043 Introduce before/after test execution callbacks in the TestContext framework ("depends on")
  • #18627 Introduce support for creating a MethodParameter from a Java 8 Parameter ("depends on")
  • #18629 Allow @Autowired to be declared on parameters ("depends on")
  • #18091 Migrate remaining JUnit 3 based tests to JUnit 4
  • #18630 Allow @Qualifier to be used in composed annotations with attribute overrides
  • #18628 Introduce autowiring support for individual handler method parameters
  • #19491 Upgrade to JUnit 5.0 M3
  • #19924 Upgrade to JUnit 5.0 M4

Referenced from: commits ecbec54, 862fb2a, 9a9551b, 7e783dd, 873fc53

2 votes, 9 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 15, 2016

Sam Brannen commented

This issue depends on #9043, #18627, #18628, #18629, and #18630.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 4, 2016

Sam Brannen commented

I have now integrated the code from my personal spring-test-junit5 repository into master in GitHub commit 873fc53:

Introduce support for JUnit 5 in the TestContext framework

This commit introduces initial support for JUnit Jupiter (i.e., the new
programming and extension models in JUnit 5) in the Spring TestContext
Framework.

Specifically, this commit introduces the following.

  • SpringExtension: an implementation of multiple extension APIs from JUnit Jupiter that provides full support for the existing feature set of the Spring TestContext Framework. This support is enabled via @ExtendWith(SpringExtension.class).

  • @SpringJUnitConfig: a composed annotation that combines @ExtendWith(SpringExtension.class) from JUnit Jupiter with @ContextConfiguration from the Spring TestContext Framework.

  • @SpringJUnitWebConfig: a composed annotation that combines @ExtendWith(SpringExtension.class) from JUnit Jupiter with @ContextConfiguration and @WebAppConfiguration from the Spring TestContext Framework.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 11, 2016

Sam Brannen commented

Resolving this issue as Complete since all core features have been merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants