본문 바로가기

Programming!

eclipse에서 junit5 실행 안되는 경우

"eclipse no tests found with test runner junit 5"


타 팀원은 모두 IntelliJ지만 아직 eclipse의 건재함을 알리고저 끝까지 쓰고있는 eclipse... 갈 수록 힘들어 지고 있다. (여기에 kotlin들어오면 그냥 intellij로 갈꺼라는..)


여튼.. 열심히 개발하고 있던 플젝에서 옆팀원이 Junit 5를 쓰자며 관련 모듈들을 gradle에 추가한 후, 나의 eclipse에서 받아서 실행을 하니 위의 오류가 뜬다.


추가된 build.gradle 의 항목.


    testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")

    testCompile("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")

    testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")

    testCompile("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")


이경우 intellij에서는 되지만(왜??) eclipse에서는 단일 메소드별로 실행되지 않았다. 해서 찾아보는데 죄다...위에 저것만 추가하면 된다고..쓰읍.


아래처럼 모듈 하나를 더 추가해야만 정상적으로 실행할 수 있다.


testCompile group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.2.0'



끝까지 가보자 eclipse!!!