Gradle Won't Run My Spock Tests - The Code Whisperer

I recently had this problem: I was writing some tests with Spock, but IntelliJ IDEA wouldn’t run them. It would run my JUnit tests (written with JUnit 4), but it wouldn’t run my Spock tests (or “specs”, if you prefer). At least this is how it seemed to me. I had made this work before, so I couldn’t understand at all why it didn’t work now. And, of course, I wanted to get this working for a training course, so I felt a certain pressure to get it to work. Nothing made sense to me.


This is a companion discussion topic for the original entry at https://blog.thecodewhisperer.com/permalink/gradle-wont-run-my-spock-tests

I love using Spock! That would do it