Gil Zilberfeld talks about unit testing investment in coding time and the actual testing economics involved

Testing Economics: The Deceptive Cost Of Writing Tests

Although ROI is dead it is still useful to talk about value and cost of witing tests. When we write automated tests, regardless of it being unit, integration, end-2-end, load test, or whatever kind, the cost we have in mind… Continue Reading…

The Power of Testability Compels You (Not)

Once more I get into a training session on unit testing, and once more I hear “It feels wrong to change my code just for testability.” My immediate reaction was “because the design you have right now is so good,… Continue Reading…

Unit Test, System Test, Red Test, Green Test

We tend to categorize different types of tests according to what they cover. Unit tests cover small portions of code, usually a method or a class, while we mock the rest of their interaction. Integration tests cover several components in… Continue Reading…

Gil Zilberfeld's Everyday Unit Testing book

New Release: V0.05 With Pre-Test Refactorings

I know it’s been a while, but the Everyday unit testing book is not going away! I’ll try to pick up speed, while you can give me feedback on v.05 of the “Everyday Unit Testing” book. Here’s what’s new in… Continue Reading…

Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #6: Add Overload

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts include:   In… Continue Reading…

Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #5: Extract Class

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts include: A few… Continue Reading…

Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #4: More Accessors!

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. It continues the last post… Continue Reading…

Gil Zilberfeld's post in the "Legacy Code to Testable Code" on refactoring legacy code for unit testing and unit tests.

Legacy Code to Testable Code #3: Adding Setter Accessors

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts include: Adding accessors… Continue Reading…

Gil Zilberfeld explains refactoring legacy code for writing unit tests, thist ime about method extraction. This pattern allows to unit test and mock methods

Legacy Code To Testable Code #2: Extract Method

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts included: As with… Continue Reading…

Gil Zilberfeld explains refactoring legacy code, starting with renaming variables, methods and classes, on the way to easier writing of unit tests.

Legacy Code To Testable Code #1: Renaming

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing tests for legacy code, and how they make our life easier. Other posts include: Renaming is easy… Continue Reading…

Copyright Gil Zilberfeld, 2025