Java Testing with Spock cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

Foreword

 

I’ve been fortunate enough to have used Spock for the majority of my career as a JVM developer. It’s now an implied and inseparable part of my process for making software. By talking to developers around the world at conferences and on mailing lists and the like, I know I am not alone in this regard.

My journey with Spock started shortly after I was thrust onto the JVM, coming from a Perl and Ruby background. “Big E” Enterprise Java held no allure for me, and I was desperate to find tools that would allow me to maintain the nimble and empowering spirit of the tools that I was used to. In Spock I found a tool that far outshined anything that I had previously come across.

My own formative ideas at the time about testing were elegantly expressed in a superior manner in Spock, by its founder Peter Niederwieser. I then supported Peter in Spock’s development and helped spread the word of what testing can, and should, be.

Spock’s key tenet is that you don’t write tests for yourself; you write them for the future you—or for the future developer who will work with the test next. So this is about more than just readability.