DEV Community

Discussion on: Unit testing isn't what you think

Collapse
 
mcsee profile image
Maxi Contieri

Michael Feathers gives a clear definition of what is NOT a unit test.

In short, your test is not unit if:

it doesn’t run fast (< 100ms / test)
it talks to the Infrastructure (e.g. a database, the network, the file system, environment variables…)

Thread Thread
 
dadyasasha profile image
Alex Pushkarev

hm, that sounds reasonable. yet I think it kind of misses the real point. Let's accept that this definition is correct (it might as well be), what real use it gives us?

You might be also interested in this post: dev.to/dadyasasha/unit-testing-is-...