【发布时间】:2016-11-29 06:55:59
【问题描述】:
我的 build.gradle 是这样配置的:
apply plugin: 'java'
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
mavenCentral()
}
dependencies {
testCompile("org.junit.jupiter:junit-jupiter-api:5.0.0-M1")
testRuntime("org.junit.vintage:junit-vintage-engine:5.0.0-M1")
}
还有一个像这样的简单测试:
public class JUnit5Test {
@Test
void test() {
}
}
当我执行测试时,我会在控制台中看到:
Test run finished after 76 ms
[ 1 tests found ]
[ 0 tests skipped ]
[ 1 tests started ]
[ 0 tests aborted ]
[ 1 tests successful]
[ 0 tests failed ]
BUILD SUCCESSFUL
但是测试报告中什么都没有:
我做错了什么?如何将 JUnit 5 结果集成到测试报告窗口中?
我正在使用 Intellij 2016.2
【问题讨论】:
标签: java intellij-idea junit5