0
$\begingroup$

Are Unit Tests Required if you have a good End to End Test? If you find problems, couldn't you always just update the end to end test to make it more robust?

$\endgroup$
2
  • $\begingroup$ Apparently, you have not applying software-testing in significant scale or writing software that are not too simple. You would have been right had it taken the same amount of effort to read, write, update, understand, share, configure, run, report and debug end-to-end tests just as easy as unit tests. Furthermore, ... $\endgroup$
    – John L.
    May 6, 2022 at 4:08
  • $\begingroup$ On the other hand, if it is about a personal or small project that targets very restricted use cases, a good end-to-end-test could be more than enough. $\endgroup$
    – John L.
    May 6, 2022 at 8:37

1 Answer 1

1
$\begingroup$

This isn't really a CS question, more of a Software Engineering question. Still: If you find an error in an end-to-end test, and you can then replicate it in a simpler unit test, then you definitely should create that unit test.

Unit tests have the big advantage of pinpointing where in your code a problem exists. End-to-end tests just tell you that something is wrong, somewhere.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.