I’m trying to convince my team to switch to Gradle from SBT, but I have one last hurdle. I’m looking to add integration tests to the project. I’ve spent some time away from Gradle but in the past I would do something like:
sourceSets {
integrationTest {
scala.srcDir file('it')
resources.srcDir file('test/resources')
compileClasspath = sourceSets.main.output + configurations.testRuntime
runtimeClasspath = output + compileClasspath
}
}
task integrationTest(type: Test) {
description = 'Runs the integration tests.'
group = 'verification'
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
reports.html.destination = file("$buildDir/reports/integrationTests")
}
That isn’t working, so I’m wondering if something has changed (or there are special cases with play). Google and Github searches haven’t been fruitful.
My unit tests are also saying no tests found. The dir structure is:
├── test
│ ├── config
│ │ ├── XXSpec.scala
│ ├── controllers
│ │ └── v1
│ │ └── XXSpec.scala
│ ├── repository
│ │ └── hbase
│ │ ├── XXSpec.scala
│ │ ├── enterprise
│ │ │ └── XXtRepositorySpec.scala
│ │ ├── localunit
│ │ │ └── XXRowMapperSpec.scala
│ │ ├── reportingunit
│ │ │ └── XXRowMapperSpec.scala
│ │ └── unitlinks
│ │ └── XXSpec.scala
│ ├── server
│ │ ├── HBaseRestSpec.scala
...