Jump to ratings and reviews
Rate this book

Java Testing with Spock

Rate this book
Summary

Java Testing with Spock teaches you how to use Spock for a wide range of testing use cases in Java. Readers new to Groovy will appreciate the succinct language tutorial that'll give you just enough Groovy to use Spock effectively.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Spock combines the features of tools like JUnit, Mockito, and JBehave into a single powerful Java testing library. With Spock, you use Groovy to write more readable and concise tests. Spock enables seamless integration testing, and with the intuitive Geb library, you can even handle functional testing of web applications.

About the Book

Java Testing with Spock teaches you how to use Spock for a wide range of testing use cases in Java. You'll start with a quick overview of Spock and work through writing unit tests using the Groovy language. You'll discover best practices for test design as you learn to write mocks, implement integration tests, use Spock's built-in BDD testing tools, and do functional web testing using Geb. Readers new to Groovy will appreciate the succinct language tutorial in chapter 2 that gives you just enough Groovy to use Spock effectively.

What's Inside

About the Reader

Written for Java developers. Knowledge of Groovy and JUnit is helpful but not required.

About the Author

Konstantinos Kapelonis is a software engineer who works with Java daily.

Table of Contents

275 pages, Paperback

First published January 1, 2015

3 people are currently reading
37 people want to read

About the author

Konstantinos Kapelonis

1 book1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
6 (16%)
4 stars
23 (63%)
3 stars
7 (19%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 5 of 5 reviews
490 reviews6 followers
October 25, 2017
Spock is a very good testing library. This book can be considered to be a Bible for Spock testing.

This book will not only introduce one to Spock, but will also help get started writing sufficiently complex test cases with Spock.
Profile Image for Gábor Hajba.
139 reviews3 followers
September 28, 2016
I liked this book because of its topic: Spock.

Naturally is Spock not your swiss army knife for testing but you can use it to have a made in Asia edition of that knife. You can write unit tests out of the box, for integration and web tests you need a bit more tweaking and libraries but it is not much work.

I missed some topics on how to write extensions to Spock -- even if it is not related to testing a chapter (or appendix) would have been OK imho.
Profile Image for Alex.
168 reviews17 followers
March 9, 2015
It's a bit too short to my taste, I'd love to see more practical examples, but since it's an early preview I'm not going to be too judgmental.
Profile Image for Mr. Andy.
231 reviews4 followers
December 12, 2016
This book really helps to point out a badly-designed codebase. ;)
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.