프로젝트

TestEngine with ID 'junit-jupiter' failed to discover tests

NickTop 2023. 2. 1. 00:05

Caused by: java.lang.ClassNotFoundException

 

Junit5 테스트하려고 할 때 해당 오류가 떴습니다

구글링을 해봐도 답이안나왔었는데..

 

Edit configuration에서

@argfile(Java 9+) -> JAR manifest로 수정했더니

정상적으로 작동합니다

 

대부분의 경우는..

1. Setting 변경

2. 파일이름을 *Test / *Tests / Test* 로 수정하기

3. useJUnitPlatform() 넣기

test {
   useJUnitPlatform()
}

4. dependency 맞추기(또는 낮추기)

https://stackoverflow.com/questions/70452633/org-junit-platform-commons-junitexception-testengine-with-id-junit-jupiter-fa

 

org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests

I wan to implement a Junit 5 test into Gradle project. I tried this: Gradle configuration: plugins { id 'org.springframework.boot' version '2.5.5' id 'io.spring.dependency-management' versi...

stackoverflow.com

위 넷 중 하나로 해결될것같습니다