Yet another JUnit 5 cannot find tests issue


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 {

dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.6.2'

// See
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/

package org.example;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TrivialTest {
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?

1 comment
Comment actions Permalink

Can you run running with --debug option to see the exact error? 

See similar question on StackOverflow:


Please sign in to leave a comment.