Test/Junit

[Error] org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 8.

잔망루피 2025. 5. 9. 16:40
org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 8.
Caused by: org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
Caused by: java.lang.NoClassDefFoundError: org/junit/jupiter/api/io/CleanupMode
Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.io.CleanupMode

 

공식문서를 참고해서 의존성을 추가해주고 해결했습니다.

다른 사람들처럼 아래와 같은 시도를 해보았지만, 해결되지 않았습니다.

  1. 경로에 한글 문자가 포함되어 있는지
  2. File > Settings > Build, Execution, Deployment > Build Tools > Gradle에서 Build and run using, Run tests using을 IntelliJ IDEA로 설정
  3. File > Settings > Editor > File Encodings에서 Global Encoding, Project Encoding, Default encoding for properties files를 UTF-8로 설정

 


참고 👇

https://junit.org/junit5/docs/current/user-guide/#running-tests

 

JUnit 5 User Guide

Although the JUnit Jupiter programming model and extension model do not support JUnit 4 features such as Rules and Runners natively, it is not expected that source code maintainers will need to update all of their existing tests, test extensions, and custo

junit.org

 

반응형