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

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

    SIMPLE FIX: (Add JUnit 5 Library)

    INSTRUCTIONS:

    • Right click on project -> Build Path -> Configure Build Path
    • In the pop-up -> Add Library -> JUnit -> JUnit 5 -> Finish -> Apply
    • You should see the JUnit 5 Library (and its jars) added to your project
    • Right click on project -> Maven -> Update Project -> OK

提交回复
热议问题