Spock is a testing framework which lets you write clean and readable tests. Based on Groovy, combining the best features of JUnit and Mockito, it's a perfect addition to your Java application.

Let's face it - writing tests can be tedious, let alone reading other people's tests. They're supposed to document and explain the production code, but sometimes they're too complicated and chaotic to do so.

Spock is your friend here. It lets you write clean and readable tests, which you can read as a good book. It forces you to structure your test in a given-when-then story, and avoids Java's verbosity to communicate just what you should.

With almost no learning curve, you can start using Spock right away, and its powerful features (data-driven tests, advanced mocking and stubbing) let you test exactly what you need. The presentation will show some examples of these features, with a comparison to what life was like before Spock.

Slides: Spock - Add a plot to your tests (PL)

Blog Comments powered by Disqus.
Find more articles like this in Blog section