~/talk

BDD with JUnit 5 and Cucumber

Talkat Conf42 Enterprise Software 2021 · 2021-03-25..05-05· [testing, java]
slides:none on file

Demonstrates BDD for a Java flight-management app using JUnit 5 nested tests then migrating to Cucumber feature files with Gherkin and IntelliJ plugins; policies enforce economy vs business rules and VIP-only business-seat rules. Cucumber reduces test code from about 207 to 157 lines and turns parameterized bonus logic into 10 scenarios (2 outlines × 5 examples) / 30 steps. Steps auto-generate Java stubs, run in IDE, and the feature tests execute green against the implemented business logic.

AI-written summary · about

  1. 0:00Introduction
  2. 3:02Limitations of Test-Driven Development
  3. 5:31Behavior-Driven Development explained
  4. 10:29JUnit nested tests
  5. 16:43Given-When-Then in JUnit
  6. 17:03Introducing Cucumber
  7. 22:03Cucumber structure
  8. 26:53Cucumber in IntelliJ
  9. 30:09Step definitions
  10. 33:40Parameterized Cucumber tests
  11. 43:03Summary
~/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.