GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - spockframework/spock: The Enterprise-ready testing and specification framework.

BranchesTags
Open more actions menu

Latest commit

 

History

3,560 Commits
3,560 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.github
.github
 
 
.idea
.idea
 
 
build-logic
build-logic
 
 
config
config
 
 
docs
docs
 
 
gradle
gradle
 
 
javadoc
javadoc
 
 
spock-bom
spock-bom
 
 
spock-core
spock-core
 
 
spock-groovy2-compat
spock-groovy2-compat
 
 
spock-guice
spock-guice
 
 
spock-junit4
spock-junit4
 
 
spock-specs
spock-specs
 
 
spock-spring
spock-spring
 
 
spock-tapestry
spock-tapestry
 
 
spock-testkit
spock-testkit
 
 
spock-unitils
spock-unitils
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
AI_POLICY.md
AI_POLICY.md
 
 
CONTRIBUTING.adoc
CONTRIBUTING.adoc
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.adoc
README.adoc
 
 
allVariants
allVariants
 
 
allVariants.bat
allVariants.bat
 
 
build.gradle
build.gradle
 
 
context7.json
context7.json
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
jitpack.yml
jitpack.yml
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

License Maven Central GitHub Workflow Status (branch) Jitpack Codecov Gitter Revved up by Develocity

spock main logo

Spock Framework

Spock is a BDD-style developer testing and specification framework for Java and Groovy applications. To learn more about Spock, visit https://spockframework.org. To run a sample spec in your browser use the Groovy Web Console.

Latest Versions

  • The latest 2.x release version is 2.5 (2.5-groovy-2.5, 2.5-groovy-3.0, 2.5-groovy-4.0, 2.5-groovy-5.0, 2.5-groovy-6.0), released on 2026-10-06.

  • The current development version is 2.6-SNAPSHOT (2.6-groovy-2.5-SNAPSHOT, 2.6-groovy-3.0-SNAPSHOT, 2.6-groovy-4.0-SNAPSHOT, 2.6-groovy-5.0-SNAPSHOT, 2.6-groovy-6.0-SNAPSHOT).

NOTE: Spock 2.x is based on the JUnit Platform and requires Java 8+/groovy-2.5+ (Groovy 3.0 or newer is recommended, especially in projects using Java 12+).

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

Snapshot Releases

Snapshots can be used by adding the Sonatype Snapshot repository:

repositories {
    // ...
    maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
}

dependencies {
    testImplementation 'org.spockframework:spock-core:2.6-groovy-4.0-SNAPSHOT'
}

Ad-Hoc Intermediate Releases

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

  1. Add https://jitpack.io as a repository

  2. Use org.spockframework.spock as groupId and the normal artifact-id

repositories {
    // ...
    maven { url 'https://jitpack.io' }
}

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

Modules

  • 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.

Building

Prerequisites

Spock needs both a JDK 11 and JDK 17+ installed.

  • JDK 11 is required to compile Spock via toolchains (automatic download is disabled).

  • The gradle build itself requires at least JDK 17 to run.

JDK locations must be made known to toolchains via JDK<version>=<PATH> environment variable if they are not in standard places recognized by Gradle, e.g. JDK11=/path/to/jdk11.

Supported versions

Spock is supported for Java version 8+.

Spock is supported for Groovy versions 2.5, 3.0, 4.0, 5.0, and 6.0.

The tests are testing Spock with the specific versions (variants) of Groovy and Java. Default Groovy version is 2.5.

The Groovy 3.0 and 4.0 variant should pass on all supported JDK versions, Groovy 2.5 does not work with Java 17+: Groovy 5.0 does not work with Java <11, Groovy 6.0 and newer does not work with Java <17:

./gradlew build

To build a specific variant of Spock, use the variant name as a parameter

./gradlew build -Dvariant=4.0

To test against a specific Java version, use the java version name as a parameter, the path to the Java version must be set via an environment variable JDK<version>=<PATH>. Of course, this can be combined with the variant selection from above.

./gradlew build -DjavaVersion=17

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

Contributing

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

Support

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 foo.bar {
  requires org.spockframework.core;
  requires org.spockframework.spring;
}

Logo

The Spock Logo, created by Ayşe Altınsoy (@AltinsoyAyse), is managed in the spock-logo repository.

Links

  • Spock Homepage — https://spockframework.org

  • Groovy Web Console — https://groovyconsole.dev/

  • GitHub Organization — https://github.com/spockframework

  • Reference Documentation — https://spockframework.org/spock/docs/

  • User Forum — https://github.com/spockframework/spock/discussions

  • Chat — https://gitter.im/spockframework/spock

  • Stack Overflow — https://stackoverflow.com/questions/tagged/spock

  • Issue Tracker — https://github.com/spockframework/spock/issues

  • Spock Example Project — https://github.com/spockframework/spock-example

  • X (Twitter) — https://twitter.com/SpockFramework

  • Mastodon — https://fosstodon.org/@spockframework

  • Bluesky — https://bsky.app/profile/spockframework.org

🖖 Live Long And Prosper!

The Spock Framework Team

About

The Enterprise-ready testing and specification framework.

spockframework.org

Topics

bdd-style-testing-frameworkgroovyjavaspock-frameworktesting

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

3.6k stars

Watchers

125 watching

Forks

483 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.