Chapter 8. Writing tests in other JVM languages
In this chapter
Programming is about expressing your ideas and intent in a language understood by a computer. For a Java programmer, that means writing code in a language that the Java compiler can compile into bytecode to be run on the JVM. More than one programming language can be used for writing code to be run on the JVM, though.
Each alternative JVM language has its distinct syntax and feel but all have something in common: they claim to be more concise and more expressive than Java for creating applications on the JVM.
In this chapter we’ll explore what kinds of advantages these modern programming languages might have for the specific task of writing unit tests. You’ll witness the ups and downs of writing tests in a dynamic language such as Groovy, and dip your toes into test frameworks that take advantage of these dynamic languages’ expressive power and the BDD style of specifying desired behavior to offer a serious alternative to writing tests in Java and JUnit.
As Dean Wampler said in 2009, “This is an exciting time to be a Java programmer.”