我已经阅读了官方文档,并且基本上阅读了其他所有与Google相关的内容。我知道,JUnit当前版本未完全支持JUnit 5中的套件,并且必须使用JUnit 4环境来运行套件,其中包含的所有测试都可以(在我看来)是JUnit 5测试。 直接执行时,我的测试可以像JUnit 5测试一样正常运行,但是运行Suite结果始终会出现PreconditionViolationException:“如果没有至少一个TestEngine,则无法创建启动器”。我的runconfig将所有测试定义为JUnit5,将我的套件定义为JUnit4(如果我也尝试将套件作为JUnit 5运行,则会出现错误“找不到任何测试”)。我已经添加了所有必要的插件,并一遍又一遍地检查了所有依赖项并运行配置等。包含所有JUnit4和JUnit5插件。即:
getAngleRad
我的TestSuite:
//Manifest
- org.junit,
- org.eclipse.xtext.junit4,
- org.junit,
- org.junit.platform.suite.api,
- org.junit.platform.runner,
- org.junit.platform.commons;bundle-version="1.4.0",
- org.junit.jupiter.api,
- org.junit.jupiter.engine,
- org.junit.jupiter.migrationsupport,
- org.junit.jupiter.params,
- org.junit.platform.commons,
- org.junit.platform.engine,
- org.junit.platform.launcher,
- org.junit.platform.runner,
- org.junit.platform.suite.api,
- org.junit.vintage.engine,
- org.hamcrest.core,
- org.opentest4j,
- org.apiguardian
有什么想法吗?