If you always thought that JUnit (and/or TestNG) was the only solution for Java unit tests, guess again! Spock is an emerging test framework written in Groovy that can test both Java and Groovy code. It even includes its own Mocking mechanism. In this article adapted from Java Testing with Spock, I will give you a high level overview of Spock and its capabilities.
By Konstantinos Kapelonis, author of Java Testing with Spock
You know the theory behind a solid testing process and how Spock can test classes written in Java. Now it’s time to delve into code! In this article, I’ll show you what spock looks like in a minimal, but fully functioning, example.
By Konstantinos Kapelonis
Spock is also a superset of the defacto testing framework for Java: Junit. In this article, excerpted from Java Testing with Spock, we will compare Spock with Junit.