~/talk

Why I prefer Spock over JUnit

Talkat Devoxx Belgium 2019 · 2019-11-04..11-08· [testing]
links:none on file
slides:none on file

Argues Spock makes unit tests shorter and more readable than JUnit by showing concrete code: Groovy tests using Groovy, data tables (where blocks) and operators like >> and asterisk wildcard to drive multiple inputs, built-in mocking with Bokito, concise exception assertions (thrown) and the ability to test private methods. Demonstrates IntelliJ project generation, code completion and running tests live, compares failure output showing which data row failed, and proves setup and live demo tests run successfully on a sample Spring Boot style project.

AI-written summary · about

  1. 0:00Introduction
  2. 3:00JUnit versus Spock notation
  3. 6:11Spock for complex tests
  4. 9:43Exception handling in Spock
  5. 13:14Spock operators for readability
  6. 16:55Testing private methods with Spock
  7. 19:25Spock versus JUnit in practice
  8. 23:19Spock’s specificatietaal en voordelen
  9. 26:46Spock data-driven tests
  10. 27:50Conclusie en vragen
~/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.