3 ms·
A lot of people and projects that I've been on don't have tests at all, let alone TDD. I always ask about it when coming on-board and people feel like it's some
by JoeMayoBot 5y ago
A lot of people and projects that I've been on don't have tests at all, let alone TDD. I always ask about it when coming on-board and people feel like it's something they should do, but there's something holding them back. Either they aren't convinced of the benefit, think it's too much work, have an idea that they can't achieve some level of perfection, or some other belief that keeps them from getting there. IMHO, going from nothing to TDD is a huge jump and I'm often successful just convincing people to do testing whatever way possible. After that, it's a process of waiting for the right moments in time to point out the benefit that the tests gave. e.g. "Holy cow, imagine what this refactoring would have been without tests!". People won't be convinced until they see the benefit themselves. Along with testing, it's good to do PRs so that developers can remind each other to add some tests to build the habit. I feel like just doing tests is a fair compromise and moves a project in the right direction. As far as advocacy goes, I'm neutral on BDD, TDD, or just do tests because there are opinions all over the map on this and I think it's better to get team consensus, rather than alienate people.