Book description
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.
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
- Testing with Spock from the ground up
- Write mocks without an external library
- BDD tests your business analyst can read
- Just enough Groovy to use Spock
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.
Quotes
Goes beyond mere exploration of Spock's API and feature set to include general testing practices and real-world application.
- From the Foreword by Luke Daley, Spock founding contributor
An awesome guide to one of the most useful test frameworks for Java.
- Christopher W. H. Davis, Nike
Discover the power of Spock and Groovy, step-by-step.
- David Pardo, Amaron
Does an excellent job of exploring features of Spock that are seldom, if ever, mentioned in other online resources. If you care about producing quality tests, then this book is for you!
- Annyce Davis, The Washington Post
Publisher resources
Table of contents
- Copyright
- Brief Table of Contents
- Table of Contents
- Foreword
- Preface
- Acknowledgments
- About this Book
- About the Cover Illustration
- Part 1. Foundations and brief tour of Spock
- Part 2. Structuring Spock tests
- Part 3. Spock in the Enterprise
- Appendix A. Installing Spock
- Appendix B. External Spock extensions and related tools
- Index
- List of Figures
- List of Tables
- List of Listings
Product information
- Title: Java Testing with Spock
- Author(s):
- Release date: March 2016
- Publisher(s): Manning Publications
- ISBN: 9781617292538
You might also like
book
Testing Java Microservices
Testing Java Microservices teaches you to implement unit and integration tests for microservice systems running on …
book
Enterprise Java Microservices
Enterprise Java Microservices is an example-rich tutorial that shows how to design and manage large-scale Java …
book
Practical Domain-Driven Design in Enterprise Java: Using Jakarta EE, Eclipse MicroProfile, Spring Boot, and the Axon Framework
See how Domain-Driven Design (DDD) combines with Jakarta EE MicroProfile or Spring Boot to offer a …
book
Building Serverless Microservices in Python
A practical guide for developing end-to-end serverless microservices in Python for developers, DevOps, and architects. Key …