~/talk

The Groovy Way of Testing with Spock

Talkat ApacheCon@Home 2021 · 2021-09-21..09-23· [testing]
linkedin:nareshak
slides:none on file

Argues Spock delivers clearer, shorter tests by using Groovy features such as given-when-then structure, Groovy power asserts that show exact expression differences, and concise data tables for parameterized cases. Shows mocking without extra libraries, verifying interaction counts and returning values to drive branches (example: mocking audienceCountService to return 200 so popularity >100 passes). Demonstrates built-in mocking, stepwise ordered journey tests, and how Spock test classes can co-exist with JUnit engines.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:41Clear intention in test names
  3. 6:32BDD style with given-when-then
  4. 10:04Power asserts for better errors
  5. 16:21Data-driven testing with where
  6. 18:26Ordered test execution
  7. 19:51Built-in mocking in Spock
  8. 22:20JUnit 4 compatibility
  9. 23:45JUnit 5 and Spock integration
  10. 26:12Shared test instances
  11. 31:21Built-in mocking advantages
  12. 32:11Groovy productivity with Spock
  13. 33:40Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.