E2E Tests don't protect you against user-facing regression bugs
E2E Testing is limited in testing user-facing system behavior. This is where Acceptance Tests come to the rescue.
"It's not working, AGAIN!" - said your biggest customer.
You don't know what to do anymore.
You had already hired the best senior developer, who wrote the best code (and even had unit tests!) but there were still frequent regression bugs reported by the customer. To make matters worse, you paid $200,000 salary and it went down the drain.
You hired more manual QA Engineers, and you have also hired the best QA Automation Engineer who wrote E2E Tests.
Why wasn’t Unit Testing, Integration Testing and E2E Testing enough?
Unit Testing can only catch regression bugs at a smaller scale, but not at the system level
E2E Testing can catch regression bugs at a large scale, encompassing our System and External Systems, but it is limited in what scenarios are possible to cover, for example, there could be many scenarios in User Story Acceptance Criteria that are not able to be covered by E2E tests, hence we have no protection there
So how can we reliably test User Story Acceptance Criteria, to avoid customer-facing regression bugs?
The answer is: Acceptance Testing.
Acceptance Tests are executable specifications of system behavior. They help us verify whether the system is behaving as expected. Thus, they protect us against system-level customer-facing regression bugs. Unlike E2E Tests, Acceptance Tests are fully controlled by us because we can test the System in isolation from External Systems which enables us to test any business-facing scenario.
We can practice Acceptance Test Driven Development (ATDD) as follows:
For a new User Story, write failing Acceptance Tests based on Acceptance Criteria, then implement the behavior, and finally verify that the Acceptance Tests pass. You can work incrementally, one Acceptance Test at a time.
For a Bug ticket, write a failing Acceptance Test, then implement the fix, and verify the Acceptance Test passes
Don’t release software if you don’t have Acceptance Tests!
Want to apply TDD in practice?
You tried TDD, but it didn’t work. That's why I'm going to help you practice TDD step-by-step. Apply TDD on a sandbox project, and get my feedback and answers to your questions. Access TDD in Legacy Code.