Talking Drupal #446 - Test Driven Development

EPISODE · Apr 15, 2024 · 1H 9M

Talking Drupal #446 - Test Driven Development

from Talking Drupal

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

NOW PLAYING

Talking Drupal #446 - Test Driven Development

0:00 1:09:11

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Not All At Once Kendall Weihe Two guys talking shop once a week. Mostly about the intersection of technology and money. French Your Way Jessica: Native French teacher founder of French Your Way Boost your French listening skills and test your comprehension with this one of a kind series of podcasts. Get the chance to listen to a real conversation between native speakers talking at normal speed AND customise your learning experience through carefully designed sets of questions (2 levels of difficulty) available for download at www.frenchvoicespodcast.com. All interviews also come with the transcript. French teacher Jessica interviews native speakers of French from around the world who share a bit of their life and passion. Where else would you meet in one same place a French yoga teacher based in Melbourne, a soap manufacturer from Provence, or a couple cycling around the world? Mindi on the Mic: From Stigma to Connection Mindi Bernice Wikstrom Welcome to Mindi on the Mic, where mental health meets real life, and stigma is left at the door. Join your host, Mindi Bernice—a therapist and advocate for authentic conversations—as she dives into the stories, struggles, and triumphs that shape who we are. Whether it's talking through trauma, exploring relationships, or finding faith-based inspiration, each episode brings honest discussions and practical insights for growth. Expect a blend of interviews, Q&As, and storytelling from people of all walks of life, creating a space to break barriers, share experiences, and connect meaningfully. The Course Mentors Podcast The Course Mentors Hey there, future course creator!Ever feel like turning your know-how into an online course is like trying to solve a Rubik's cube blindfolded? Well, grab your headphones because "The Course Mentors Podcast" is here to be your secret weapon!Meet Aimee and Odette (that's us!), your new best friends in the course creation world. We've been in the trenches for over a decade, and for the last five years, we've been rocking the online course space. Now we're here to spill all our secrets in bite-sized, 15-20 minute episodes that'll fit perfectly in your coffee breaks.No fluff, no filler - just real, actionable advice that'll take you from "um, what's a landing page?" to "holy moly, I just hit six figures!". We're talking everything from crafting your course to marketing it like a pro and building a business that'll have you pinching yourself.Whether you're dreaming of ditching the 9-to-5 grind, adding a sweet extra income str
URL copied to clipboard!