TDD, ATDD and BDD all define tests before the code is written. TDD directs coding through test cases. ATDD derives tests from acceptance criteria. BDD writes the desired behaviour as test cases in simple natural language, usually Given/When/Then. ISTQB's CTFL v4.0 syllabus says each one applies early testing and follows shift left.
How do the three test-first approaches differ?
In test-driven development (TDD), test cases steer the coding, taking the place of extensive up-front software design. The order is: write the tests, write code that satisfies them, then refactor both the tests and the code.
In acceptance test-driven development (ATDD), the tests come from the acceptance criteria and are worked out during system design. They exist before the matching part of the application is built.
Behavior-driven development (BDD) states how the application should behave as test cases written in simple natural language that stakeholders can follow, usually in the Given/When/Then format. Those test cases should then be translated automatically into executable tests.
All three support an iterative development model. In all three, the tests may be kept as automated tests that protect code quality during later changes and refactoring.
What does shift left mean?
Shift left is another name for the early testing principle: testing moves to an earlier point in the SDLC. Testers do not wait until the code exists or the components have been integrated. Later testing still has to be done: shift left is no reason to neglect it.
The syllabus lists practices that achieve it. Review specifications from a tester's perspective, which often finds ambiguities, gaps and inconsistencies. Write test cases before the code and run the code in a test harness while it is being implemented. Use continuous integration, and better still continuous delivery, so that source code arrives in the repository with automated component tests and gets fast feedback. Finish static analysis of the source code before dynamic testing starts, or run it automatically. Where possible, begin non-functional testing as early as component testing.
Shift left can cost more training, effort or money early in the process. It is expected to save effort or cost later. It also needs stakeholders who are convinced of the idea.
Where the exam catches people
Believing TDD starts from acceptance criteria: that is ATDD. TDD uses test cases to direct the coding.
Believing the TDD cycle ends when the tests pass: the last step is refactoring the tests and the code.
Believing BDD scenarios are documentation only: they should be translated automatically into executable tests.
Believing shift left makes system testing or other late testing redundant: shift left moves testing earlier but does not justify neglecting later testing.
Believing shift left covers only reviews: it also includes writing tests before code, CI with component tests, static analysis and early non-functional testing.