Arenât they tests?
No, they are coded checks.
Arenât they automated?
No, testing is never automated. What they are are structured input for a tool which have to be written, and the results observed, interpreted and acted upon by a human.
Why wouldnât you consider it test automation?
âTest automationâ is a bad way of saying what it really means: âusing tools to help testingâ. You can also use tools to create checks to help programming (TDD). This is testing in the same way that me checking my bank balance makes me an accountant. Is it not the inspection of financial accounts? Isnât that what accountants do? Well, yes, but nobody would seriously call me an accountant or say that Iâm doing accounting because accountants are experts in the field who do many other things in the pursuit of different information to make different choices with reference to a different body of knowledge. Their intent is different to mine, at the very least in terms of scope.
Testing is bigger than checking and bigger than tools - and âautomatedâ âtestsâ are artifacts of checking tools.
assuming the tests from TDD become the unit tests
Are they written to serve a test strategy that mitigates risks deemed valuable in context? Or are they written so that a programmer can make something properly? The first is a well-designed unit test, the latter is a TDD artifact to shorten feedback loops in programming. Maybe one check can be both things, but the intent of use is different so you may get different results.
So yeah, we could say that TDD checks are checks and therefore part of testing and are used in tools and therefore part of automation. We could also say they are written using English words and therefore a short story or poem. Technically true but pragmatically misleading. I would say that automated testing (or, as Iâd call it in my own head, âtool-assisted testing using an automatic check suiteâ) is part of testing. TDD is part of an approach to programming that leverages some of the tenants of testing.
Hereâs one article on the difference in intent between testing and TDD: TDD Is About Design, Not Testing | Dr Dobb's
Hereâs one that separates unit tests from the TDD practice: http://blog.xebia.com/tdd-not-unit-tests/. I donât agree with all of it but it makes the distinction.
Hereâs one about TDD as a lifestyle, unit tests being only a part of that: My Version of "TDD is About Design, Not About Testing" | Codementor