When is a test not a unit test?
Oct 3rd, 2006No Comments
To quote from this page from Michael Feathers:
A test is not a unit test if:
- It talks to the database
- It communicates across the network
- It touches the file system
- It can’t run at the same time as any of your other unit tests
- You have to do special things to your environment (such as editing config files) to run it.
It goes on to say that those aren’t bad tests, but they are bad unit tests because they use things outside of your control. These types of tests should still be run, just after your regular unit tests pass.
