Bending Behat's Benefits: A live coding adventure
summary
Live coding shows Behat and the Drupal Behat Extension driving a vanilla Drupal 8.5 Umami site: tests create content (10 articles), toggle the promoted flag, and assert related-sidebar behavior so tests stay stable as editors add content. A prebuilt region map maps friendly names to CSS selectors; one scenario runs ~36 assertions to prove ordering and promotion rules. CI runs are illustrated with CircleCI, and headless browser options (Selenium vs headless Chrome) are compared; tests pass but reveal that unclear client requirements break behavior, so clarity trumps automation.
AI-written summary · about
chapters (13)
- 0:00Introduction and setup
- 3:58Why use Behat for testing
- 7:52Quick fix without clarity
- 12:13Writing first Behat test
- 16:33Understanding Behat definitions
- 20:30Automating test content
- 23:22Hiding complexity in tests
- 29:49Client feedback and mistakes
- 31:17Importance of client conversations
- 33:30Behavior driven development
- 37:02Making tests readable
- 42:21Resources and next steps
- 43:44Q&A session
related talks
27mAutomated Web Acceptance Testing with Behat
45mBehaviour Driven Development and Behat: Telling Stories Through Code
49mTesting for the Brave and True
45mBehat from 0 to Hero: a Practical Guide
45mUsing Behat as a Webapp Automation Tool
45mBehat for characterisation on tests
26mBehaviour Driven Development with Laravel
50mAutomate your testing with Nightwatch.js
