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.
@Speck
class HelloSpock {
def "can you figure out what I'm up to?"() {
expect:
name.size() == size
where:
name << ["Kirk", "Spock", "Scotty"]
size << [4, 5, 6]
}
}Read ten reasons why Spock is for you, see more examples, learn how to write a specification, or get started right away!
News
- 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
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.