Due to changes in Spring Framework 6.0 (see https://github.com/spring-projects/spring-framework/issues/29229), ContextCustomizer implementations are logged at DEBUG level using only their simple name.
Consequently, we see log statements such as the following.
DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [MySpringTests]: [ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer, WebTestClientContextCustomizer, DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer]
The last Customizer entry is for org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory.Customizer.
To improve diagnostics, I suggest that the Customizer class be renamed to WebDriverScopeContextCustomizer or WebDriverContextCustomizer.
Comment From: CodeWithSouma
Could you please tell me which file name I have to rename and if provide the file path it will be helpful for me to fix this issue.
Comment From: scottfrederick
@CodeWithSouma The Customizer class mentioned above is in this file: https://github.com/spring-projects/spring-boot/blob/3.0.x/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebDriverContextCustomizerFactory.java#L44
Comment From: quaff
Could you please tell me which file name I have to rename and if provide the file path it will be helpful for me to fix this issue.
You should try to find it by yourself, it's a basic prerequisite if you want to contribute, otherwise please don't make noise.
Comment From: CodeWithSouma
I want to resolve this issue
Comment From: wilkinsona
@quaff your comment is unnecessary. If we felt that it was necessary, @scottfrederick would have replied differently to the original question from @CodeWithSouma.
Comment From: philwebb
@sbrannen I'm happy to rename this class since it's internal, but I wonder if the logging in Framework should be done at ClassUtils.getShortName instead of Class.getSimpleName? I think that would result in WebDriverContextCustomizerFactory.Customizer in the logs.
Comment From: sbrannen
I'm happy to rename this class since it's internal,
Thanks. I made sure it was internal before asking the team to rename it. 😉
but I wonder if the logging in Framework should be done at
ClassUtils.getShortNameinstead ofClass.getSimpleName? I think that would result inWebDriverContextCustomizerFactory.Customizerin the logs.
I'd prefer not to switch to ClassUtils.getShortName. One of the primary goals of https://github.com/spring-projects/spring-framework/issues/29229 was to reduce DEBUG logging to a minimum (at least, as much as possible).
If we made that switch, many of the other "simple names" would end up considerably longer -- for example, DuplicateJsonObjectContextCustomizer would become DuplicateJsonObjectContextCustomizerFactory.DuplicateJsonObjectContextCustomizer, etc.