Dealing with Brownfield Projects
I cringe whenever I hear brownfield project, and probably you do too. Design decisions are already taken, code is already written by previous developers, and code quality varies between one class and another; brownfields are not for the faint-hearted.
As there could be multiple definitions for the term brownfield, I want to start by defining it here, so we are all on the same page. From this book’s perspective, a brownfield project is a project not covered by unit tests and was probably written a while ago. It might have been covered by other types of tests than unit tests, but we will still refer to it as a brownfield. Some techies also refer to it as a legacy project.
As you have already figured out, we have dedicated a whole chapter to brownfields as there are challenges in introducing TDD or unit testing to such projects. We will discuss those challenges and how to overcome them.
In this chapter, we will cover the following topics...