The Enterprise-ready testing and specification framework.
Java Groovy JavaScript XSLT Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.github Add SSCCE notice to issue template Aug 23, 2017
.idea changes to idea files Dec 25, 2013
buildSrc add buildSrc to allow use of spock-gradle from spock build Feb 5, 2013
config Sign and publish artifacts from Shippable Feb 28, 2015
docs Make Retry annotation declarable on spec classes (#879) Aug 18, 2018
gradle Update to gradle 4.8.1 Jun 28, 2018
spock-bom Update to Gradle 3.5 May 18, 2017
spock-core Make Retry annotation declarable on spec classes (#879) Aug 18, 2018
spock-gradle Start iteration for 1.1-SNAPSHOT Mar 2, 2015
spock-guice Improve GuiceExtension auto attaches mocks Nov 15, 2017
spock-report Add JPMS module name definition in MANIFEST.MF Sep 19, 2017
spock-specs Make Retry annotation declarable on spec classes (#879) Aug 18, 2018
spock-spring Fix @SpringBean mocks throwing UndeclaredThrowableException for ... (#… Aug 17, 2018
spock-tapestry Add JPMS module name definition in MANIFEST.MF Sep 19, 2017
spock-unitils Add JPMS module name definition in MANIFEST.MF Sep 19, 2017
.editorconfig Add support for iteration reporting, Update libraries and resources May 17, 2017
.gitignore Improve build configuration for shippable CI Sep 14, 2014
.travis.yml Update github token Aug 2, 2018 Add CodeTriage badge to spockframework/spock (#826) Jun 30, 2018
LICENSE google code import Feb 18, 2009
NOTICE updated notice and readme May 26, 2010 Prepare next iteration Aug 14, 2018
appveyor.yml Fix appveyor.yml, Try to upload test restults on failed build Jun 28, 2018
build.gradle Prepare next iteration Aug 14, 2018 Enable parallel by default for local env but keep disabled on ci Jun 28, 2018
gradlew Update to gradle 4.0.2 (use -bin distro again) Aug 4, 2017
gradlew.bat Update to Gradle 3.5 May 18, 2017
settings.gradle Add Spring Boot 2 Test Project Jun 28, 2018

License Maven Central Linux Build Status Windows Build Status Jitpack Codecov Gitter

Spock Framework

Spock is a developer testing and specification framework for Java and Groovy applications. To learn more about Spock, visit To run a sample spec in your browser, go to

Latest Versions

The latest release version is 1.2-rc-1 (1.2-rc-1-groovy-2.4, 1.2-rc-1-groovy-2.5), released on 2018-08-14. The current development version is 1.2-SNAPSHOT (1.2-groovy-2.4-SNAPSHOT and 1.2-groovy-2.5-SNAPSHOT).

NOTE: Spock 1.2 drops support for Java 6, Groovy 2.0 and Groovy 2.3.

Releases are available from Maven Central. Development snapshots are available from Sonatype OSS.

Ad-Hoc Intermediate Releases

For intermediate stable builds we recommend to use Jitpack (go here for instructions):

  1. Add as a respository
  2. Use org.spockframework.spock as groupId and the normal artifact-id
repositories {
    // ...
    maven { url '' }

dependencies {
        compile 'org.spockframework.spock:spock-core:spock-1.1'
        compile 'org.spockframework.spock:spock-spring:spock-1.1'
  1. For intermediate releases you can also use the commit-hash as version, e.g. compile com.github.spockframework.spock:spock-core:d91bf785a1


  • spock-core -- Core framework. This is the only mandatory module.
  • spock-specs -- Specifications for spock-core, implemented using Spock. Not required for using Spock.
  • spock-spring -- Integration with the Spring TestContext Framework.
  • spock-tapestry -- Integration with the Tapestry 5 IoC container.
  • spock-guice -- Integration with Guice 2/3.
  • spock-unitils -- Integration with Unitils.
  • spock-report -- Interactive, business-friendly HTML reports.


Supported versions

Spock is supported for Java version 7, and 8 (with Groovy 2.5 Java 9 and 10 are supported as well).

Spock is supported for Groovy version 2.4+

The tests are testing spock with a specific versions (variants) of groovy. Default is groovy version 2.4

The groovy 2.4 and 2.5 variant should pass on all supported JDK versions:

./gradlew clean build

(Windows: gradlew clean build). All build dependencies, including the build tool itself, will be downloaded automatically (unless already present).


Contributions are welcome! Please see the contributing page for detailed instructions.


If you have any comments or questions, please direct them to the user forum. All feedback is appreciated!

Java 9 Module Names

All published jars (beginning with Spock 1.2) will contain Automatic-Module-Name manifest attribute. This allows for Spock to be used in a Java 9 Module Path.

  • spock-core -- org.spockframework.core
  • spock-spring -- org.spockframework.spring
  • spock-tapestry -- org.spockframework.tapestry
  • spock-guice -- org.spockframework.guice
  • spock-unitils -- org.spockframework.unitils

So module authors can use well known module names for the spock modules, e.g. something like this:

open module {
  requires org.spockframework.core;
  requires org.spockframework.spring;


Live Long And Prosper!

The Spock Framework Team