oliverdavies.uk/source/_presentations/tdd-test-driven-drupal.md
2024-11-19 18:36:56 +00:00

3.3 KiB

title description speakerdeck video image use events
TDD - Test-Driven Drupal How to write automated tests for Drupal, and how to create a new Drupal module using test driven development.
id ratio url
088cb18033064f5cb18d1079795294a1 1.77777777777778 https://speakerdeck.com/opdavies/tdd-test-driven-drupal
type id
youtube 81J0dPvqG-g
url width height type
%site.assets.url%/assets/images/talks/test-driven-drupal-development.png 2560 1440 image/png
talks
name location date time url
DrupalCamp London 2017 London, UK 2017-03-04 16:15 - 17:00 ~
name location date time url
DrupalCamp Dublin 2017 Dublin, Ireland 2017-10-21 12:00 - 12:40 http://2017.drupal.ie
name date location url
Drupal Bristol 2017-11-22 Bristol, UK https://www.drupalbristol.org.uk
name date location
Drupal Somerset 2018-06-14 Glastonbury, UK
name date time location url
Drupal Developer Days 2018 2018-07-05 12:15 - 13:00 Lisbon, Portugal http://lisbon2018.drupaldays.org
name date time location url
DrupalCamp London 2019 2019-03-02 14:00 - 14:45 London, UK ~
name date location url online
NWDUG 2020-05-12 Manchester, UK http://nwdrupal.org.uk true
name date url online
Bay Area Drupal Camp (BADCamp) 2020-10-14 https://2020.badcamp.org/session/tdd-test-driven-drupal true
name date url online
DrupalCon Europe 2020 2020-12-08 https://events.drupal.org/europe2020/sessions/tdd-test-driven-drupal true
name location date time url
DrupalCon Lille 2023 Lille, France 2023-10-17 15:00 - 15:45 https://events.drupal.org/lille2023/session/tdd-test-driven-drupal-introduction-automated-testing-and-test-driven-development
name location date url
DrupalCamp Belgium Ghent, Belgium 2024-05-10 https://www.drupalcamp.be/en/drupalcamp-ghent-2024/session/tdd-test-driven-drup%E2%80%A6
name location date url online
Drupal London Meetup London, UK 2024-11-20 https://www.meetup.com/london-drupal-user-group/events/303500889 true

Testing is important.

It allows developers to add new features and edit and refactor existing code without the worry of adding regressions, reduces the reliance on manual testing to discover bugs, and by taking a test-driven approach, your implementation code is leaner as you only write what is needed for your tests to pass.

Drupal 7 includes the SimpleTest module for unit and functional testing, whilst Drupal 8 also includes and supports PHPUnit - the defacto PHP testing framework used by other PHP projects, including Symfony and Laravel - making it easier for people to test their code.

With testing being one of the Drupal core gates, with tests needing to be included with every new feature or bug fix and core's 100% pass rate policy, testing has become an essential skill when contributing to the core or when working on your own projects.

In this talk, we'll cover the methodology and terminology involved with automated testing and then take a test-driven approach to create a new Drupal module.

P.S. If you want to learn more about automated testing and test-driven development in Drupal, register for my free 10-day email course.