Junit 5 and Gradle 4.6 check task shows "Test events were not received"
Answered
IntelliJ IDEA 2017.3.5
Gradle 4.6
Trying to migrate to junit5, but having an issue where the gradle check task doesn't display the tests in the run window, instead it says "Test events were not received".

When I run the same thing with junit4, tests are displayed:

build.gradle
group 'com.tryingtomigrate'
version '1.0-SNAPSHOT'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.0'
}
}
apply plugin: 'java'
apply plugin: 'org.junit.platform.gradle.plugin'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}
package com.tryingtomigrate;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class myTest {
@Test
public void myTests() {
assertTrue(true);
}
}
Please sign in to leave a comment.
Hello,
We have related request on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-175708
As a workaround you could use IDEA test runner to run tests.
Awesome. I tried to search, but the title didn't hint enough that it was a related issue. Should I post on that issue with a link to this post?
Allan,
Thanks for adding link. Keep following the issue on YouTrack.
The issue has been moved to a new YouTrack issue: https://youtrack.jetbrains.com/issue/IDEA-188404