- Create a Maven project with groovy, spock and junit.
- Create a spock test case with
def variable = new ....() {} declaration ({} is the key here). For example,
class MySpec extends Specification {
def list = new ArrayList() {
}
def "..."() {
...
}
}
- Run all tests in a package/directory
Eclipse shows "No tests found with test runner 'JUnit 4'.

test-project.zip
Maven build succeeds.
def variable = new ....() {}declaration ({}is the key here). For example,Eclipse shows "No tests found with test runner 'JUnit 4'.
test-project.zip
Maven build succeeds.