The entire point of giving a methodology a name and writing about it is to get everyone on the same page. So if people have different ideas on what TDD is, then people should stop talking about TDD until everyone agree what is and what is not TDD.
And only after everyone agrees, one should talk about the pros and cons and assess the success of the methodology depending on the situation. "you are doing it wrong" is not helpful.
Back to the article. I think not mentioning TDD at all would make it a better article.
I tried banning a particular word once and coming up with 6 new words on the basis that you couldnt tell which of the 6 meanings somebody was using unless you used a different term for each one. That didnt work very well. People got too attached to the old, overloaded term.
Expecting an entire industry to stop using a term theyve become used to is not realistic.
I wrote a short rant about it last week: https://dev.to/thiht/tdd-is-a-personal-practice-3o76
Another example: Nation State. I can't get a clear answer to what that really means :-).
Back to computers: REST is a great example.
(Also, you can easily run integration tests in parallel with a little planning and attention to detail. For example, if your IDs don't rely on a sequence (like UUIDs), you can generally run them in parallel regardless of database connections.)
Are you avoiding rewriting your code so you can write integration tests, or are you writing integration tests so you can avoid rewriting your code?
Those that have been around the block of refactoring code so you can write good unit tests, tend to realize that the better-designed code isn't a side benefit. It's the entire point. The test is the side benefit.
Integration tests should be avoided if the same coverage can be reached with a refactor and some unit tests. For instance, it's very common for components to rely on complicated combinations of state. For instance, imagine a nightmare component that has nine boolean state parameters. To integration-test every combination, that's 512 cases. But in cases like those, you might discover through refactoring that some of those state combinations can compressed. For instance, you might be able to refactor into three sub-components, each of which take three boolean parameters and return one boolean result, and where the parent component only depends on those three booleans, which can be mocked. So then in that case, you've reduced the amount of tests you need to write to 32 total... that's 1/16th the effort.
I mean, I know that in common practice, neither are done, and people just leave the component largely untested, and then get bug reports that they close as "Can't reproduce".
The Classicist point of view resonates strongly with me - I’ve long considered mocking in tests to be a code smell, and only usually justified for stubbing external services or hardware.
Never happened to me, and we use a lot of junit tests at work.
I don't see the value in "Do not isolate code". Isolating a single method or such is often necessary, especially a unit test of a Utils class. But I only tend to do this if the "user story" centric test cases don't end up covering everything.