I'm new to the Spock framework, and I have an issue with using an abstract java test class with it.
What I would like to have is a groovy test class, which extends some other java abstract class with some common methods, which in turn extends Specification class.
So, the code is as follows:
class GroovyTest extends AbstractTest {
def "my test"() {
....
}
}
public abstract class AbstractTest extends Specification {
...
some common methods
...
}
When I ran the GroovyTest class I'm getting the following error:
org.spockframework.runtime.InvalidSpecException: Specification 'org.my.package.AbstractTest' was not compiled properly (Spock AST transform was not run); try to do a clean build
When I'm using a groovy abstract class then it works without errors.
So my question is there a way to use Java class with Spock framework?