I still bunch collaborative tests into the term "integration tests". For me it still makes sense that those are integration tests, isolated or not. :P . So you were fine! I don't think the follow-up post is necessary but if it helps people great! And so for me I still say it as "integration tests are a scam!" :P. If people want to know what an integration test is, I boil it down to two types. For example since I do a lot of React and React.js is so testable I can say this:
- testing through a browser or using real things (network, etc.) OR in the case of react using mount() but hitting a real API over the wire (network calls) a real database, etc.
- testing many parts together, or many components. This might be an isolated test, or it might be hitting real things, depends on your style. For me when I do create very few of these which in React is using enzyme's mount(), they're not hitting real things and are what I coin "isolated integration tests" but then that might confuse people because "isolated" could mean many things. To me in this case "isolated" just means an integration test that is testing via mount() which tests the entire component tree at that seam together, so it's isolated in that it doesn't hit real things but it's still an "integration test" because it's testing the integration or "collaboration" of many components in the React tree together at once.
I do love this though which are great summaries:
- So, let me clarify again: the integrated tests scam happens when we use integrated tests for feedback about the basic correctness of our system, and write them in place of microtests that would give us better feedback about our design. Don’t do this
- So yes, I write some integrated tests, but many, many fewer than you, for a specific purpose, and I design in a way to intentionally make them obsolete over time. I write them in a way that avoids the scam. And I certainly don’t use them to check that “the system hangs together”. That way lies the scam.
I think it's be helpful to explain though what you mean by 'I write them in a way that avoids the scam'
I think a couple real code examples could help but realize you might have some of those in your course?
I like your idea of calling the isolated unit tests 'micro tests' or maybe 'micro isolated tests' which is even better at least to me. They fit into newbies to tests's brain easier at first. Then after they get their feet wet you can introduce the term 'seams'.
Yes I know this reply is about a 2 year old post...lol. I'm a busy guy.