Talking Drupal

Talking Drupal #446 - Test Driven Development


Listen Later

Today we are talking about Test Driven Development, Why it’s important, and How it improves development with guest Alexey Korepov. We’ll also cover Test Helpers as our module of the week.

For show notes visit: www.talkingDrupal.com/446

Topics
  • What does the term Test Driven Development (TDD) mean
  • Does Drupal make use of TDD
  • What makes TDD different from other methods of Development
  • Do you have to change your way of thinking
  • What are some good resources to learn TDD
  • Do you have any pointers for teams looking to get started
  • Are certain kinds of projects better suited to TDD
  • How have dev teams adapted to TDD
  • Any advice on environment setup
  • Any special tools
Resources
  • Open telemetry
  • QA Engineer
  • Kent Beck Test Driven Development: By Example
  • Needs tests tag
  • Local unit tests
  • PHPUnit
Guests

Alexey Korepov - korepov.pro Murz

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan Martin Anderson-Clutz - mandclu Matt Glaman - mglaman.dev mglaman

MOTW Correspondent

Martin Anderson-Clutz - mandclu

  • Brief description:
    • Have you ever wanted an API that could dramatically simplify the process of writing Drupal unit tests? There’s a module for that.
  • Module name/project name:
    • Test Helpers
  • Brief history
    • How old: created in Sep 2022 by today’s guest, Alexey Korepov
    • Versions available: 1.3.0 compatible with versions of Drupal 9.4 or newer, right up to Drupal 11
  • Maintainership
    • Actively maintained, latest release less than 3 months ago
    • Security coverage
    • Test coverage, would be ironic if it didn’t
    • API Documentation is available, linked from the project page
    • Number of open issues: 2 open issues, which are actually feature requests
  • Usage stats:
    • 5 sites officially, but modules or sites can leverage Test Helpers without enabling it, and this usage is recommended, so the number is actually higher
  • Module features and usage
    • Provides a new container that automated tests can leverage to perform common tasks with much less code.
    • For example, you can create a user or a node with a single line of code
    • You can also mock more complex operations like an entityQuery or loadMultiple call, again with a single line of code
    • Traditionally, writing unit tests is more complicated because by design they run without fully bootstrapping Drupal
    • That means that your test needs to mock functions or services in the code you’re testing which can result in units tests being much longer than the code they’re testing
    • Test Helpers also allows your tests to leverage existing mocks and stubs for popular services
    • The project page also links to the recording and slides for a talk Alexey gave about Test Helpers at DrupalCon Pittsburgh last year, if you want to do a deeper dive
...more
View all episodesView all episodes
Download on the App Store

Talking DrupalBy Talking Drupal Hosts

  • 4.9
  • 4.9
  • 4.9
  • 4.9
  • 4.9

4.9

28 ratings


More shows like Talking Drupal

View all
Radiolab by WNYC Studios

Radiolab

43,774 Listeners

Marketplace by Marketplace

Marketplace

8,622 Listeners

Planet Money by NPR

Planet Money

30,734 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

284 Listeners

Freakonomics Radio by Freakonomics Radio + Stitcher

Freakonomics Radio

32,071 Listeners

99% Invisible by Roman Mars

99% Invisible

26,147 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

162 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

990 Listeners

The Indicator from Planet Money by NPR

The Indicator from Planet Money

9,501 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

91 Listeners

Hard Fork by The New York Times

Hard Fork

5,434 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

15,371 Listeners

The Weekly Show with Jon Stewart by Comedy Central

The Weekly Show with Jon Stewart

10,284 Listeners

The AI Daily Brief (Formerly The AI Breakdown): Artificial Intelligence News and Analysis by Nathaniel Whittemore

The AI Daily Brief (Formerly The AI Breakdown): Artificial Intelligence News and Analysis

496 Listeners

Risky Business with Nate Silver and Maria Konnikova by Pushkin Industries

Risky Business with Nate Silver and Maria Konnikova

256 Listeners