Open
Description
Rob Winch opened SPR-12031 and commented
Status Quo
The Spring TestContext Framework (TCF) makes it very easy to run tests that share the same configuration within a test class hierarchy or even across a test suite. However, it does not support annotating a method with @ContextConfiguration
.
Proposals
- It would be nice if the TCF would allow
@ContextConfiguration
on a test method. This would allow for easily testing various permutations of configuration. - Support throw-away contexts (i.e., contexts that are loaded for a single test method but not stored in the context cache), perhaps via a separate issue that serves as a building block for this issue.
Issue Links:
- Support Verifying Errors with @ContextConfiguration at method level [SPR-15034] #19600
- Support @ActiveProfiles at method level [SPR-9338] #13977
- Support @TestPropertySource at method level [SPR-14378] #18951
- Support 'throw-away' context for a test class [SPR-13722] #18295
- SPR-12031 Support @ContextConfiguration at method level #1255
Referenced from: commits spring-attic/spring-framework-issues@73db0e2
7 votes, 14 watchers