In every software engineering book, testers and developers are two very different roles and professions with very different mindset.
Developer: How can I build that?
Tester: How can I broke that?
This is because since the begining of time it was obeserved that the developer is not able to find all the bugs in his code.
If you think a bit it is obvious why. The builder will never ship a critical bug if he knows the bug exists.
With time, tools, practices and roles were introduced to improve the sw quality.
Of all, unit tests are the most misleading. With Unit Tests, Developer first write a test that fails than the smallest piece of code to fix it. It is a building - not a testing - process.They are tests meant to build small units of sw which addded up will lead to a complete sw. Their value is firstly for the developers, a safty net for future changes code as the tests will be rerun automatically (this is Continous Integreation) after every change in the code and show any break.
It is true that this improves the quality but assuming this will lead to bug free sw is a sign of immaturity.
Testers and QA are big cost, not everyone can afford it and is not always necessary, BUT NEVER EXPECT THAT DEVELOPER WILL FIND HIS OWN BUGS.