Unit Tests as a Specification
summary
Shows that Spock (Groovy on the JUnit platform, Gradle build) cuts boilerplate and produces BDD given-when-then specs that run as tests and export clickable HTML docs via Spock reports. Demonstrates on a coffee-machine project: readable parameterized tables, detailed failure diagnostics, built-in mocking/stubbing, and the pending feature workflow to ship specs before implementation. Claims about reduced code (~40%) and ~2k GitHub stars are backed by live runs and generated reports linking issues so it works end-to-end.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 7:58Speaker from Riga
- 8:40Unit tests essential
- 10:10Java testing history
- 13:43Spock framework revolution
- 18:17Spock benefits
- 24:51Live coding Spock basics
- 31:25Advanced Spock assertions
- 35:08BDD blocks in Spock
- 39:08Data-driven Spock tests
- 45:17Mocking in Spock
- 51:10Test doubles and matchers
- 52:13Tests as documentation
- 55:29Spock reports
- 1:00:10Conclusion and comparison
- 1:03:07Pending tests and conditions
- 1:08:50Q&A
related talks
18mSpeedup unit testing with the Spock framework
29mWhy I prefer Spock over JUnit
49mWhat Mr. Spock would possibly say about modern unit testing
35mThe Groovy Way of Testing with Spock
46mEasy testing with Spock
49mFabulous Tests with Spock and Groovy
42mTimeTest your java applications with Spockline01
01h 17mTesting Java, Groovy, Spring and Web Applications with Spock
