Gil Zilberfeld
How to TDD in legacy code
#1about 6 minutes
Why standard TDD fails in complex legacy code
Real-world code complexity and dependencies make the simple red-green-refactor cycle difficult and risky without existing tests.
#2about 3 minutes
A modified TDD process for existing codebases
A four-step approach is introduced, involving characterization tests and pre-refactoring before applying the standard TDD cycle.
#3about 7 minutes
Using characterization tests to create a safety net
Characterization tests are written to capture the current behavior of a system, including its bugs, providing a baseline for safe refactoring.
#4about 6 minutes
A step-by-step guide to fixing a bug
A bug is fixed by first writing a failing test, making the minimal code change to pass, and then refactoring both production and test code for clarity.
#5about 6 minutes
Pre-refactoring code to prepare for new features
Before adding new functionality, the code is refactored using techniques like guard clauses and switch statements to make the insertion point clear and simple.
#6about 3 minutes
Adding a new feature with the TDD cycle
After preparing the codebase, a new feature is added by writing a failing test and then implementing the minimal code required to make it pass.
#7about 5 minutes
Core principles for safe and fast development
The key takeaways are minimizing risk, separating new functionality from cleanup, and consistently leaving the code better than you found it.
#8about 9 minutes
Q&A on BDD and testing untestable code
The discussion covers the role of BDD and how to handle untestable code using tools like approval tests or snapshot testing to capture system behavior.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
02:52 MIN
The vicious cycle of untestable legacy code
How Unit Testing Saved My Career
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:02 MIN
Practical strategies for testing legacy applications
Testing .NET applications a Tool box for every developer
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
07:27 MIN
Why developers avoid unit testing JavaScript
Yes, You Need to Unit Test your JavaScript. Here's How.
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
05:29 MIN
Why legacy code is so difficult to understand
Seven Myths, Three Reasons, One Goal
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:18 MIN
How "Clean as You Code" organically improves legacy code
The Clean as You Code Imperative
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:11 MIN
Building a sustainable culture of clean code
Breaking the Bug Cycle: TDD for the Win
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
04:01 MIN
Adopting TDD as a design tool, not just a testing method
Treat yourself - A tale about dog training and test-driven development
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
04:05 MIN
Evaluating the benefits and challenges of TDD
Why you must use TDD now!
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
Featured Partners
Related Videos
Why you must use TDD now!
Alex Banul
Write tests you love, not hate
Jens Happe
Yes, You Need to Unit Test your JavaScript. Here's How.
James Bender
Treat yourself - A tale about dog training and test-driven development
Mirjam Aulbach
Test Driven Development with JavaScript
Sascha Depold & Parinaz Roghany
Breaking the Bug Cycle: TDD for the Win
Nadeen Hussein
TDD for Vue.js Developers
Markus Oberlehner
How To Test A Ball of Mud
Ryan Latta
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

JO Media Software Solutions GmBh
Brunn am Gebirge, Austria
Senior
CSS
Angular
JavaScript
TypeScript

autoiXpert GmbH & Co. KG
Stuttgart, Germany
Senior
Node.js
Angular
MongoDB
TypeScript

Lotum media GmbH
Bad Nauheim, Germany
Senior
Node.js
JavaScript
TypeScript

Speech Processing Solutions
Vienna, Austria
Intermediate
CSS
HTML
JavaScript
TypeScript


doinstruct Software GmbH
Berlin, Germany
Senior
GIT
JavaScript
TypeScript

Schulz.codes GmbH
Darmstadt, Germany
Intermediate
Senior
React
JavaScript
TypeScript

