Back to top

How to get started with writing tests for contrib

How to get started with writing tests for contrib




In this session I'll cover how you can get started with writing tests for contrib projects or drupal core.

The session will be divided in 3 bigger parts:

  • I'll first cover what testing is and how a test works, I'll cover the types of test and what the differences are
    • What is testing
    • Why you should write tests
    • Unit testing
    • Kernel testing
    • Functional testing
    • How to setup testing on your local machine
  • Writing tests on your own modules or existing modules (without tests available)
    • Start with simple things
    • How to create a roadmap
    • What files you'll need
    • How to set it up on your drupal module
    • General tips and tricks on how to write them better
  • Writing tests on already existing modules (with tests available) or drupal core
    • Discuss the advantages on adding tests on existing modules
    • How you can find modules to write tests on

The reasons I'm choosing for this session is because on drupalcon vienna last year, I also got started in writing tests for contrib modules, and I think it's the ideal way to get more into contributing.
So my goal is that after this session, at least some people get out of the session, and go to the sprint to start writing some tests.


A little bit more info about me:

  • Presenter name: Brent Gees
  • position title: Drupal developer - Architect at Dropsolid, Ghent
  • email:
Attachment Size
how to get started.pdf 5.14 MB
Room Theater (B104)
Session type