Andrea Koutifaris
1 min readOct 18, 2019

--

5. If You Can, Test the Entire Spectrum

No, you shouldn’t.

Tests are inertia when changing the code. They are definitely necessary for a code that wants to evolve but also wants to say clean.

I think I read in one of the Martin’s book that a test is “a bit of inertia”. Well it’s more a byte, but that’s not the point.

The point is that BDD or TDD is better than testing later. In TDD you have to write just the test tests that allow you to write production code. Where as testing later makes you think you need more tests than you actually need.

Have a look to my article: https://medium.com/free-code-camp/test-driven-development-what-it-is-and-what-it-is-not-41fa6bca02a2

Since you are already testing, switching to BDD would be a good improvement… in my opinion of course!

Also I don’t think code should be 100% covered by tests. I think it is mandatory not to mix test and untested code. Especially I don’t see a lot of added value in testing the views. But this is just my opinion (in contrast with that from Martin).

Anyway thanks for the article, I do agree with the other points! :)

--

--

Andrea Koutifaris
Andrea Koutifaris

No responses yet