You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over the past few weeks it has become apparent that our test suite does not fully cover all features of the Bean Override support in the TestContext framework.
To remedy that, we should introduce tests to cover corner cases and features that are currently not tested. As a starting point, we can adopt several of the tests for @MockBean and @SpyBean from Spring Boot's test suite.
Features to Test
The following is a list of features we should make sure we test before Spring Framework 6.2 GA.
Combining SpringExtension and MockitoExtension on the same test class, including support for @Captor combined with @MockitoSpyBean.
Support for @MockitoBean and @MockitoSpyBean when @ContextHierarchy is used.
@MockitoBean replacement of a bean with @Async methods.
@MockitoBean replacement of a scoped proxy.
@MockitoBean replacement of a Spring AOP proxy.
Spring AOP proxy that wraps a Mockito spy created via @MockitoSpyBean.
Mock reset support for beans within the ApplicationContext configured via MockReset.before() and MockReset.after().
Overview
Over the past few weeks it has become apparent that our test suite does not fully cover all features of the Bean Override support in the TestContext framework.
To remedy that, we should introduce tests to cover corner cases and features that are currently not tested. As a starting point, we can adopt several of the tests for
@MockBean
and@SpyBean
from Spring Boot's test suite.Features to Test
The following is a list of features we should make sure we test before Spring Framework 6.2 GA.
SpringExtension
andMockitoExtension
on the same test class, including support for@Captor
combined with@MockitoSpyBean
.@MockitoBean
and@MockitoSpyBean
when@ContextHierarchy
is used.@MockitoBean
replacement of a bean with@Async
methods.@MockitoBean
replacement of a scoped proxy.@MockitoBean
replacement of a Spring AOP proxy.@MockitoSpyBean
.ApplicationContext
configured viaMockReset.before()
andMockReset.after()
.Related Issues
@MockitoBean
and@MockitoSpyBean
make it easier to inject any underlying proxy target as well as the mock or spy #33743The text was updated successfully, but these errors were encountered: