I updated Android Studio to version 3 and since then all my spock tests, when in a java module, do not run when trying to run them from inside the application (right click on groovy folder -> Run 'Tests in groovy'). I get a:
Class not found: "package.name.classname"Empty test suite."
Same if I try to run a single test.
If I run the test task from the gradle panel I get this: error. Cause: unknown.
On the other hand:
- Any spock tests in android modules run fine.
- All my java tests in all my modules run fine.
- All my tests (spock and java) run fine when running them from outside AS using gradle (gradlew clean test).
My setup:
- gradle v4.1
- android gradle plugin v3.0.0
- java version compatibility v1.8
- in my java modules i use the gradle groovy plugin
- in my android modules i use the groovy android gradle plugin
A few things I tried after searching in both google and here:
- changing the android gradle plugin back to v2.3.3 and gradle to v3.3
- trying to copy all groovy classes to build/classes/java/test
src/test/groovy
orsrc/test/java
? – Millenariansrc/test/groovy
. – Secession