트러블 슈팅(Trouble Shooting)

[테스트 코드 오류] No tests found for given includes 오류

머훈 2024. 6. 1. 00:04
xecution failed for task ':test'.
> No tests found for given includes: [Meohun.weather.WeatherApplicationTests.trueTest](--tests filter)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 3s
4 actionable tasks: 4 executed


테스트 코드 작성중 No tests found for given includes 오류 발생.

 

 

1. Java 버전 확인

  • 만약, 1.8버전이라면, build.gradle 파일에 특히 아래 플러그인 버전 확인
    • id 'org.springframework.boot' version '2.5.6'

    • id 'io.spring.dependency-management' version '1.0.11.RELEASE' 


    • sourceCompatibility = '1.8'


    • test { useJUnitPlatform() }


    • tasks.named('test') { useJUnitPlatform() }

 

2. IntelliJ - Settings - Build, Execution, Deployment - Build Tools - Gradle 

  • Run tests using 옵션 : IntelliJ IDEA 로 수정