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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access