I have a strange problem and no idea how to fix it. I have a simple multi project setup. Every project just declares it dependencies and some task. Nothing special.
Parent project
|_ Project 1 Frontend
|_ Project 2 Service layer
|_ Project 3 Database
Every project has a build.gradle of course. But if I start now ‘gradle test’ it says ‘Build successful’ but the tests didn’t run. I don’t have any reports… Same for integration test task… I don’t know why it’s not working, there is no crazy configuration.
----------------------------------- Core build file is (i take this. the other look nearly the same)
version = '1.0'
dependencies {
compile project(':toolkit-data')
}
compileJava.dependsOn (':toolkit-data:build')
If I start ‘gradle test’ inside the core project it does not start any tests but says ‘Build successful’… Link to log file is log.txt. It contains the debug output.
Well I tried something: I copied the core project in a tmp dir and added the whole parent configuration inside the core build file (to make this project a single project and not part of a multi project). Than I started gradle tests and the test are running… It seems that my multi project setup is incorrect. But it’s nothing special… Same as the sample project and the docs.
I suggest to compare your configuration with ‘samples/java/withIntegrationTests’ in the full Gradle distribution. There are some differences - for example, you don’t put ‘sourceSets.test.output’ on the ‘integrationTestCompile’ class path. One of those differences may be the problem.
Ok I try. But I’m not sure I want this. Because I don’t need the output of the integrationtest to be in the classpath of the integrationtests - no need for it. Why should this have any impact on my unit tests?
But thanks! I try this of course. I come back and post the result…