Hi guys, this post will be short but in my opinion it is really useful for agile developers. Some weeks ago, when I was reading the book “Agile Coaching” by Rachel Davies and Liz Sedley, I found an interesting part that I wanted to share: “Unit tests Rules” by Michael Feathers.
Michael Feathers tells us that a test is not the unit test if:
- it talks to the database
- it communicates across the network
- it touches the file system
- it can´t run correctly at the same time as any of your other unit test
- you have to do special things to your environment (such as editing config files) to run it
He also tells us that tests which do these kind of things are not bad tests. Most of times, it is necessary to have these kind of tests, however, it´s important to separate them from true Unit Test so that we can keep a set of tests that we can run fast whenever we make changes.
This is a short pillar I wanted to share with you.
