March 2016
Intermediate to advanced
304 pages
8h 9m
English
Chapter 1. Introducing the Spock testing framework
Listing 1.1. Sample Spock test
Listing 1.2. Java class under test and JUnit test
Listing 1.3. Spock test for the Adder Java class
Listing 1.4. A JUnit test for two Java classes
Listing 1.5. Spock test for two Java classes
Listing 1.6. Introducing an artificial bug in the Java class under test
Listing 1.7. A JUnit test with method names unrelated to business value
Listing 1.8. A Spock test with methods that explain the business requirements
Chapter 2. Groovy knowledge for Spock testing
Listing 2.1. Groovy class conventions
Listing 2.2. Groovy field conventions
Listing 2.3. A complete Groovy script
Read now
Unlock full access