O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

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 15 UNIT TESTING (JUNIT)

This chapter explores the use of the JUnit testing framework within the Groovy environment. We use classes from the case study of Chapter 13 to illustrate how unit testing can be accomplished with the GroovyTestCase class. Next, we show how several GroovyTestCases can be combined into a GroovyTestSuite. Finally, we reflect on the role of unit testing in an iterative, incremental approach to application development. Throughout our discussion, we emphasize just how easy it is to benefit from unit testing with Groovy.

15.1 UNIT TESTING

The fundamental unit of an object-oriented system is the class. Therefore, an obvious candidate for a unit in unit testing is the class. The approach taken is to create an object ...

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