[英]Eclipse Photon: Test Suite results in “Np test found with test runner 'JUnit 5”." error message
In Eclipse Photon I have a project based on Java 1.8 with multiple Junit 5 Unit Tests. 在Eclipse Photon中,我有一个基于Java 1.8的项目,具有多个Junit 5单元测试。 The individual unit tests work well and now I'm looking to generate a Junit Test Suite.
各个单元测试运行良好,现在我希望生成一个Junit测试套件。
Based on the JUnit5 User Guide I have created a AllTest.java file that has the following code: 基于《 JUnit5用户指南》,我创建了一个具有以下代码的AllTest.java文件:
@RunWith(JUnitPlatform.class)
@SuiteDisplayName("Test Suite")
@SelectPackages("com")
public class AllTests
{
}
When I execute these Java file I get the following error message: 当我执行这些Java文件时,出现以下错误消息:
Screen Shot of Error Message 错误消息的屏幕截图
I've also tried the @SelectClasses and have run into the same issue. 我也尝试了@SelectClasses并遇到了同样的问题。
Has anyone else seen this issue or know how to resolve it? 是否有其他人看到过此问题或知道如何解决?
@RunWith(JUnitPlatform.class)是一个JUnit4批注,因此在执行测试时,我们必须选择RunConfiguration并选择Junit 4是下拉列表,而不是Junit5。这将运行测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.