My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification language. Thanks to its JUnit runner, Spock is compatible with most IDEs, build tools, and continuous integration servers. Spock is inspired from JUnit, jMock, RSpec, Groovy, Scala, Vulcans, and other fascinating life forms.

class HelloSpock extends spock.lang.Specification {
    def "length of Spock's and his friends' names"() {
        expect:
        name.size() == length

        where:
        name     | length
        "Spock"  | 5
        "Kirk"   | 4
        "Scotty" | 6
    }
}  

Run this example in Spock Web Console

Read ten reasons why Spock is for you, see more examples, learn how to write a specification, or get started right away!


News

  • 2011-10-24 Spock is coming to SpringOne2GX
Join us for Smarter Testing With Spock and Next Level Spock.
  • 2011-09-28 Spock presentation at New York Groovy/Grails meetup group
Thanks for coming and the great questions! Slides and code are available from https://github.com/spockframework/spock-ggnyc-2011.
  • 2011-02-14 Source code repository moved to GitHub
The source code repository has moved to https://github.com/spockframework/spock. The Google Code Subversion repository won't see any further updates. All other infrastructure (issue tracker, forum, wiki) remains at Google (Code).
  • 2010-12-11 Spock 0.5 released
This release brings major improvements like deep integration with Hamcrest and dynamic reordering of test execution order to provide faster feedback. For more information on what's new, see the official release announcement. Also read ImportantChanges.
  • 2010-09-29 Back on tour
Spock is back on tour! Join me for my talk at SpringOne2GX. More infos here.
  • 2010-08-31 Who is using Spock?
We have started to list companies and projects which are known to use Spock here. If your name belongs on that list, please leave us a note!
  • 2010-05-27 Spock Framework 0.4 released
To learn more about this release, read the official announcement.
  • 2010-03-11 Introducing the Spock Blog
The official Spock Blog has opened its doors, starting with a mini-series about new features in the upcoming 0.4 release.
  • 2009-11-19 Spock Framework 0.3 released
To learn more about this release, read the official announcement.
  • 2009-10-25 Grails Spock Plugin is here
Many of you have asked for it, and finally we have it ready: a Spock plugin for Grails! The plugin blends seamlessly with the Grails environment and already supports unit, integration, and functional specifications. Get it from the Grails plugin repository. A non-snapshot version of the plugin will be released together with the next Spock release, which is just around the corner. Big thanks to Luke Daley for his fantastic work!
  • 2009-09-14 Spock extensions for Guice, Spring, and Tapestry IoC
Spock now provides extensions for Guice, Spring's TestContext framework, and Tapestry IoC, thus making it much easier to write integration-level specifications. Available in the latest snapshot.
  • 2009-09-09 Spock Web Console launched
Spock Web Console, a close cousin of the popular Groovy Web Console, lets you view, edit, run, and even publish Spock specifications for others to see. It's all just one click away, so what are you waiting for?
  • 2009-08-27 Spock presentation at Devoxx
On November 16th, I will present Spock at Devoxx, the largest Java-related IT conference in Europe. Hope to see you there! More information on the presentation is here.
  • 2009-08-27 Spock presentation for Chicago Groovy User Group
On September 8th, I will do a Spock presentation for the Chicago Groovy User Group. Thanks to Bill Gloff for inviting me!
  • 2009-08-11 Spock presentation for Groovy Users Minnesota
Following Hamlet D'Arcy's invitation, I presented Spock at today's Groovy Users Minnesota meeting. Running a two and a half hour web conference in the middle of the night was certainly a new experience, but all in all it went quite well. By the way, I'm always looking for opportunities to talk about Spock. If you are interested, let me know!
  • 2009-07-29 Spock Framework 0.2 released
Read the official announcement here.
  • 2009-07-14 Spock IDE support on the rise
In the latest EAP release of IntelliJ IDEA 9, Spock specifications enjoy advanced JUnit features like running a single test method and rerunning failed test methods only. On the Eclipse front, the new Groovy Eclipse plugin (yet to be released) has successfully run its first Spock specification (screenshot).
  • 2009-06-30 Spock 0.2 is coming at warp speed
Meanwhile, have a look at the new features, or try out the latest snapshot.
  • 2009-06-29 Twitter loves Spock
Here is the evidence.
  • 2009-06-23 Spock appears at Gr8Conf, JavaOne, and Jazoon
A big thank you to Paul King, Dirk Koenig, and Neal Ford!
  • 2009-03-19 Spock goes Maven Central
Spock releases are now available from http://repo1.maven.org. Snapshots continue to be available from http://m2repo.spockframework.org/snapshots.
  • 2009-03-11 Spock article on DZone
Meet Spock! explains how Spock is different from other testing frameworks, and why it is worth a closer look.
  • 2009-03-05 Spock Framework 0.1 released
Read the official announcement here.
  • 2009-02-27 Spock mentioned in InfoQ article
In What's New in Groovy 1.6, Spock is mentioned as a testing tool along with easyb and Gmock. Thanks Guillaume!

Supporters

Thanks to JetBrains for providing IDEA and TeamCity licenses.

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.

Powered by Google Project Hosting