Spring
Boot将Surefire插件配置为运行名称以
Test或
Tests而不以开头的所有测试类
Abstract。您可以在
spring-boot-starter-parentpom中看到此配置。如果您的测试类已命名,
TestAuthController则它与该配置不匹配。将其重命名为
AuthControllerTest或
AuthControllerTests应解决您的问题。

Spring
Boot将Surefire插件配置为运行名称以
Test或
Tests而不以开头的所有测试类
Abstract。您可以在
spring-boot-starter-parentpom中看到此配置。如果您的测试类已命名,
TestAuthController则它与该配置不匹配。将其重命名为
AuthControllerTest或
AuthControllerTests应解决您的问题。