3 ms·
To be honest I don't actually differentiate them either. When my function under test calls sort() I don't fake that call out, so technically I just wrote an in
by bluGill 8y ago
To be honest I don't actually differentiate them either.
When my function under test calls sort() I don't fake that call out, so technically I just wrote an integration test. (In fact I work with one group that will inject a fake sort())
If I write a library foo which has sub-module bar which has class baz and fuzz, is the test for bar that tests both baz and fuzz a unit test of an integration test? Of course if you are a user of my library tests for foo are unit tests to you...
- szatkus 8y agoI once spent an evening reading and watching wise people on the internet to find out where is difference between unit tests and integration tests. It's really fuzzy and depends on a source. There's no agreement what is "unit". Few classes interacting with each other could still be a unit. I didn't find any strict definition which would be useful in practice. I just write tests and guess they are mostly integration tests, some end-to-end tests and a few unit tests.