Yet another JUnit 5 cannot find tests issue Follow
Answered
I am using 2020.1.1. I have created a brand new project using New > Project ... and selecting Gradle, and checking IntelliJ Platform Plugin. Then I only changed two things:
in build.gradle I changed testCompile:
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.21'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.6.2'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2020.1.1'
}
patchPluginXml {
changeNotes """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""
}
And created the file src/main/test/java/org/example/TrivialTest.java:
package org.example;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class TrivialTest {
@Test
void testTrivial () {
String helloString = "Hello World";
Assertions.assertEquals("Hello World", helloString);
}
}
When I try running Gradle task verification->test:
When I try to run it by clicking the green arrow in the gutter:
What am I missing?
Please sign in to leave a comment.
Can you run running with --debug option to see the exact error?
See similar question on StackOverflow: https://stackoverflow.com/questions/58476580/no-tests-found-for-given-includes-testfilter-includetestsmatching