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

前端 未结 30 2460
盖世英雄少女心
盖世英雄少女心 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:18

    I'm using:

    Spring Tool Suite 4 Version: 4.4.2.RELEASE Build Id: 201911201053 Java version: 1.8.0_191

    and the message displayed is No tests found with test runner 'JUnit5'

    what worked for me was the configuration below

        
            1.8
            5.5.2
            1.5.2
         
    
        
            org.junit.jupiter
            junit-jupiter-engine
            ${junit-jupiter.version}
            test
        
        
            org.junit.platform
            junit-platform-launcher
            ${junit-platform.version}
            test
        
    

提交回复
热议问题