I'm trying to run the JUnit tests for this Gradle project and I'm getting the following error in IntelliJ:
* What went wrong:
Execution failed for task ':test'.
> No tests found for given includes: [Service.AlbumArtistServiceTest](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 382ms
I've tried everything I saw on the internet, this is my build.gradle file:
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
test {
useJUnitPlatform()
}
The test was generated with IntelliJ, so it should have seen it. Does anyone have any idea what to do now?