O'Reilly logo

Java Testing with Spock by Konstantinos Kapelonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Groovy knowledge for Spock testing

This chapter covers

  • Understanding the connection between Java and Groovy
  • Learning Groovy conventions
  • Comparing JUnit asserts and Groovy power asserts
  • Using Groovy utilities for common testing needs
  • Obtaining test data with Groovy

Learning a new programming language is usually a daunting task. You must study a new syntax, new concepts, and new libraries all at once to be productive. If you’ve spent too many years with a single language, several concepts are so entrenched that having to “unlearn” them poses a big barrier to any alternative (even if it’s objectively better). With Groovy, this isn’t the case because Groovy is a cousin language to Java. Much of your current knowledge can be reused ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required