CHAPTER 8Testing with Groovy

Testing your code is important, very important. It is hard to imagine releasing code to production nowadays if it hasn't been adequately tested. Testing your application involves testing it at different levels: unit testing, integration testing, and systems testing. The most common way of unit testing Java code is to write JUnit tests. JUnit is the de facto Java testing framework and can be obtained for free from http://www.junit.org. Almost all Java IDEs have integrated support for running JUnit tests.

Given the importance of testing, Groovy already comes with a bundled version of JUnit, and assertions are a core part of the language. In addition, Groovy offers some helper classes built on top of JUnit that make ...

Get Groovy and Grails Recipes now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.