Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory

前端 未结 30 2434
盖世英雄少女心
盖世英雄少女心 2020-11-29 22:31

The problem

Whenever I run my projects JUnit test (using JUnit 5 with Java 9 and Eclipse Oxygen 1.a) I encounter the problem that eclipse can\'t find any tests.

30条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 23:09

    Same error i faced in eclipse version Oxygen.3a Release (4.7.3a) . There is issue in Maven Dependencies mismatch.To solve i have updated my Pom.xml with following dependecies.

    http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.netapp.junitnmactiopractice JunitAndMactioPractice 0.0.1-SNAPSHOT

    
        UTF-8
        1.8
        5.1.1
        1.1.1
    
    
    
        
            
                maven-compiler-plugin
                3.1
                
                    ${java.version}
                    ${java.version}
                
            
        
    
    
    
        
            org.junit.jupiter
            junit-jupiter-engine
            ${junit.jupiter.version}
        
        
            org.junit.platform
            junit-platform-runner
            ${junit.platform.version}
            test
        
    
    

提交回复
热议问题