Course of TDD: Test-Driven Development

Dani SantamariaJavier Ferrer

By Dani Santamaria y Javier Ferrer Software Design and Architecture y Methodologies and good practices

Learn Test-Driven Development (TDD) and the different ways and styles to apply it in Real World™️ applications

💸 First lesson available without registration 💸

Learning the practice of TDD can help you build useful software that works over time. The rules are simple:

  • 🔴 Write a failing test for the behavior you want to add
  • 🟢 Make the test pass, by writing the minimum code possible.
  • 🔵 Refactor to improve the software design

However, applying TDD in Real World™️ applications has certain challenges, such as when is it worth applying? What style of TDD should I use? In what direction do I perform TDD? What if the design does not emerge during the refactor phase?

In this course you will learn:

  • 🚀 TDD concepts and techniques: Fake-it, Obvious implementation, Triangulation, Transformation Priority Premise (TPP), etc.
  • 👓 TDD approaches when solving a use case: Inside-out, Outside-in, and Middle-out
  • 💃 TDD styles, taking those parts of Classic TDD and Mockist TDD that we like the most for each situation.
  • 👌 Best practices and recommendations for tackling TDD in our day-to-day.
  • 🦄 Design implications: SOLID, YAGNI, and DRY.

Throughout the course, a series of exercises are proposed so you can practice the technique in different situations.

During the course we use a variety of programming languages. Some examples are specific to web development (Back-end and Front-end), but we address the concepts in an agnostic way so that they can also be extrapolated to other contexts.

Learn TDD in depth to apply it daily in complex applications! 💪

Course Content

  1. 🍄 What is TDD?
    • ⚡ TDD in 10 minutes
    • ♻️ Your first TDD cycle: Pricing calculation with VAT
  2. 🙋 Inside-out TDD: The TDD cycle
    • 🟢 Optimizing the TDD cycle: 3 ways to turn green
    • 🔵 Refactoring: designing and generalizing the solution
    • 🛠 Let's practice! Inside-out exercise
  3. ⚡ Optimizing TDD cycles
    • 📐 Transformation Priority Premise (TPP): Deciding how much to generalize
    • 🔥 Transformation Priority Premise in action: Graduated Tiered Pricing
    • 👶 Baby steps: The frustration of walking slowly
    • 🛠 Let's practice! TPP exercise
  4. 🙏 Inside-out TDD problems in Real World™️ applications
    • 😬 What a mess! The typical example is getting out of hand in the Real World™️
    • 🤔 TDD vs BDD vs ATDD vs DDD
  5. 💁‍♂️ Outside-in TDD developing an HTTP API… or maybe Middle-out?
    • ☁️ Fake it Outside-in TDD: Starting with E2E tests
    • 😶‍🌫️ Fake it Outside-in TDD: Finishing the use case
    • 🕵️ Inside-out, Outside-in or Middle-out: From where to where do I perform TDD?
    • 🛠 Let's practice! Outside-in exercise
  6. 🕹️ Common mistakes applying TDD with external services: SOLID to the rescue!
    • 🔴 Designing in the Red phase: Getting prices from Stripe
    • 📦 Mocking other subsystems: Stock management
    • 📨 Too many mocks in the use case: Event-Driven Architecture to the rescue
    • 🛠 Let’s practice! Exercise with mocks
  7. 🖼️ Middle-out TDD in Next.js with Cypress and Testing Library
    • ✍️ TDD from the front-end: Registration form in Next.js
    • ✅ Middle-out TDD with Cypress and Testing Library
    • 🤔 TDD in the Front-end: When and why to use it?
    • 🛠 Let's practice!
  8. 🕸️ TDD in highly coupled Legacy code
    • 🥇 How to start applying TDD in legacy code: Golden master
    • 👐 Refactor legacy code to apply TDD: Hit & Run strategy
    • 🚀 Strategy for when it's worth investing in Legacy
    • 🛠 Let's practice! TDD in Legacy
  9. 👓 Alternative approaches and next steps
    • 🤯 FLIPPED Programmers: Learning to model
    • 🤘 TDD styles: Classicist vs Mockist
    • 🦉 Final review and next steps

Videos of the course

Related courses

See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Access to a subset of courses to lay the foundation for maintainable, scalable, and testable code
  • Company invoice
Popular

standard

24,92 €
Save 121
Annual payment of 299
per month
  • Full course catalog
  • Design and architecture challenges
  • Highlighted solutions videos for challenges
  • Receive job offers verified by Codely
  • Company invoice

premium

41,58 €
Save 89
Annual payment of 499
per month
  • All previous benefits
  • Early access to new courses
  • More benefits coming soon

We won’t increase the price while your subscription is active