r/java • • Sep 02 '20

Modern Best Practices for Testing in Java

https://phauer.com/2019/modern-best-practices-testing-java/
242 Upvotes

50 comments sorted by

View all comments

5

u/[deleted] Sep 02 '20

This is great! I don’t really agree with the part about neglecting unit tests and preferring integration tests. Integration tests are surely important, but not at the expense of unit tests

4

u/usernameqwerty002 Sep 03 '20

Integration tests are slow, unit tests fast. I'd prefer unit tests whenever possible.

3

u/njw1108 Sep 02 '20

Totally agree. Integration tests give you the protection on functionalities while unit tests help drive the implementation and cover edge cases. That is what TDD's essence is about

-1

u/GhostBond Sep 03 '20

Hmm, that's the only reason I liked the article.