Is end 2 end testing enough? [closed] Is end 2 end testing enough? [closed] angularjs angularjs

Is end 2 end testing enough? [closed]


This is a big topic and not something that can really have an authoritative answer, but I'll do my best to cover a few points.

First, you should be thinking about the purpose of the tests. According to the Agile Testing Quadrants, unit testing exists primarily to support the team. They are generally written close to the product (eg. using TDD, probably by the developers themselves) and serve to increase the developer's confidence that they haven't broken anything with that last change. With this confidence, developers can work efficiently and refactor with reckless abadon - the TDD dream. Unit tests don't answer the question "Is this fit for our customer's purpose", but that's not why they are there.

Functional testing (e2e, if I understand your description) still supports the team with fast turn around of test results but actually does start to answer the question "Can a user do the thing?". You're testing what the user sees and starting to test your actual product in a way that is meaningful to users.

Quadrants 3 and 4 start to address the whether or not the product does the thing well (ie. is it fit for purpose and not just functional), but that's another subject.

Based on this understanding of testing, part of the answer depends on your team structure. Do you have a separate dev and test team? If so, it may make sense for your devs to write unit tests (they're for their benefit after all) and for the test team to handle the other quadrants independently (including writing e2e as they see fit). And if your test and dev team are the same? If you can get a similar turnaround time (test written -> useful result) out of your functional/e2e tests as you can from unit tests, it may make sense to focus on them and reap the rewards for both methods without overlap.

The short answer I'd give is to simply ask "What benefit are we getting out of this test?". If you find your answers for tests overlapping, it may make sense to remove the redundancy.

Some of the above points and a few more are discussed here, so I'll stop rambling for now.