No tests found for given includes: [com.xxx.smm.kafka.KafkaTopicCountMonitorTest.test](filter.inc

idea 在 springboot + Gradle test时报错:No tests found for given includes

解决图

No tests found for given includes: [com.xxx.smm.kafka.KafkaTopicCountMonitorTest.test](filter.inc

  • Gradle:IntelliJ IDEA使用Gradle作为默认测试运行器。结果,在持续集成(CI)服务器上获得相同的测试结果。此外,在命令行中运行的测试将始终在IDE中运行。
  • IntelliJ IDEA:选择此选项可将测试过程委派给IntelliJ IDEA。在这种情况下,IntelliJ IDEA使用 JUnit 测试运行器,并且由于增量编译,测试运行得更快。