~/talk

Why Use Spock Instead of JUnit Mockito for Your Java Tests

TalkinSpanishat Codemotion Madrid 2016 · 2016-11-18..11-19· [testing, java]
links:none on file
slides:none on file

A comparison of Spock (the Groovy-based testing framework) vs JUnit + Mockito for Java tests, showing real side-by-side test code to highlight what you gain and lose by using Spock. Also covers how common Java unit/integration testing best practices change when using Spock—which practices become less important, which new ones appear, and how tests become more focused on intent.

AI-written summary · about

  1. 0:00Introduction
  2. 2:59Spock basics and Groovy
  3. 7:38Test structure and DSL
  4. 15:06Mock creation differences
  5. 19:40Mock interactions and verification
  6. 24:12Property-based tests
  7. 28:06Configuration and strings
  8. 30:55Named parameters and builders
  9. 34:06Private methods vs inline
  10. 35:52Collection literals
  11. 37:18Spock pros and cons
  12. 40:51Overcoming change resistance
  13. 42:02Q&A
~/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.