title: Gradle Cannot Find Integration Test, JUnit 5 and Spring Boot: No tests found for given includes:
body: <p>When I run:</p>
  <pre><code>./gradlew  :integrationTest --tests com.shohidulhaque.whatdoyouthinkauthorizationservice.WhatdoyouthinkauthorizationserviceApplicationTests2 
  </code></pre>
  <p>I get the following output:</p>
  <pre><code>No tests found for given includes: [com.shohidulhaque.whatdoyouthinkauthorizationservice.WhatdoyouthinkauthorizationserviceApplicationTests2](--tests filter)
  </code></pre>
  <p>I am confident that I have setup the build.gradle properly.</p>
  <p>I have uploaded this project to github. It can be found at <a href="https://github.com/shohidulhaque/integrationTestRepo" rel="nofollow noreferrer">https://github.com/shohidulhaque/integrationTestRepo</a></p>
  <p>I would be grateful if any one could help on this.
  I am using:</p>
  <p>Gradle 6.4.1
  openjdk version &quot;11.0.7&quot; 2020-04-14</p>
  <p>Here is my build.gradle file:</p>
  <pre><code>plugins {
      id 'org.springframework.boot' version '2.3.1.RELEASE'
      id 'io.spring.dependency-management' version '1.0.9.RELEASE'
      id 'org.asciidoctor.convert' version '1.5.8'
      id 'java'
      id 'groovy'
      id 'java-library'
  }
  
  group = 'com.shohidulhaque'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = '11'
  
  configurations {
      compileOnly {
          extendsFrom annotationProcessor
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  ext {
      set('snippetsDir', file(&quot;build/generated-snippets&quot;))
  }
  
  
  sourceSets {
      integrationTest {
  
          groovy.srcDir &quot;$projectDir/src/integrationTest/groovy&quot;
          resources.srcDir &quot;$projectDir/src/integrationTest/resources&quot;
          compileClasspath += main.output + test.output
          runtimeClasspath += main.output + test.output
      }
  }
  
  configurations {
      integrationTestImplementation.extendsFrom testImplementation
      integrationTestRuntime.extendsFrom testRuntimeOnly
  }
  
  task integrationTest(type: Test) {
  
      description = 'Runs integration tests.'
      group = 'verification'
  
      testClassesDirs = sourceSets.integrationTest.output.classesDirs
      classpath = sourceSets.integrationTest.runtimeClasspath
  }
  
  check.dependsOn integrationTest
  
  
  dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
      implementation 'org.springframework.boot:spring-boot-starter-data-ldap'
      implementation 'org.springframework.boot:spring-boot-starter-hateoas'
      implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
      implementation 'org.springframework.boot:spring-boot-starter-web'
      implementation 'org.springframework.data:spring-data-rest-hal-browser'
      compileOnly 'org.projectlombok:lombok'
      developmentOnly 'org.springframework.boot:spring-boot-devtools'
      annotationProcessor 'org.projectlombok:lombok'
  
      testImplementation('org.springframework.boot:spring-boot-starter-test')
      {
          exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
      }
  
      testImplementation 'com.unboundid:unboundid-ldapsdk'
      testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
  
      testImplementation group: 'org.codehaus.groovy', name: 'groovy', version: '3.0.4'
      testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.0-M3-groovy-3.0'
  
      testImplementation (group: 'org.spockframework', name: 'spock-spring', version: '2.0-M3-groovy-3.0')
  }
  
  test {
      outputs.dir snippetsDir
      useJUnitPlatform()
  }
  
  asciidoctor {
      inputs.dir snippetsDir
      dependsOn test
  } 
  </code></pre>