I am getting an error "test events not received" when trying to run a basic Spock Test within my IDE. The issue seems to be due to :test NO-SOURCE. What am I missing?
Gradle output:
C:\Users\pc\IdeaProjects\schema-test>gradlew :cleanTest :test --tests com.scarlatti.SpockTest
:cleanTest UP-TO-DATE
:compileJava NO-SOURCE
:processResources
:classes
:compileTestJava NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
:test NO-SOURCE
BUILD SUCCESSFUL
Project structure:
src
├───main
│ └───groovy
│ └───com
│ └───scarlatti
│ └───App.java
└───test
└───groovy
└───com
└───scarlatti
SpockTest.groovy
build.gradle:
apply plugin: 'java'
apply plugin: 'idea'
repositories {
mavenCentral()
}
dependencies {
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
testCompile 'cglib:cglib-nodep:2.2'
}
Simple Spock test:
class SpockTest extends Specification {
@Test
"test that a spock test will run"() {
when:
println "running spock test..."
then:
notThrown(Exception)
}
}