What will be the testing output if Developers test their own code? Developer who develops the code will not go in depth and hence always try to see happy paths. Misunderstanding the requirements is the main concern of developer testing. If requirements are misunderstood the developer sees it as functionality so that will never go in depth to test the application & will never find any error.
Optimistic Developer: As an optimistic developer usually feels that the code they have developed is working perfectly because of which they feel that there is no need to test in this path and hence skip all the bugs right here.
Developer Vs Tester: The major difference between a developer testing & tester testing is that the developers usually make sure that their code is working properly whereas testers usually look for how the application is not working correctly. Developers testing their own code-know their code very well and also knows the traps in it. Developers know very well that where it can fail, where to concentrate more, which path is more important related to the application.
Developers can do these: They can do unit testing in a very good manner & effectively identifying boundary cases. The above qualities will be applicable to a developer who wants to be a good tester. Even after knowing the system very well most of the developers consider testing as a painful job. This is because of their negligence where they tend to skip many paths of testing, as it's a very painful experience for them. As the code is very fresh to the developers in unit testing itself they can fix it easily rather than getting a bug from testers after 2 to 3 days.
A tester's responsibility is to make sure that each & every path of the code is tested properly. In order to verify the application is not breaking anywhere the testers have to give much importance to all minute possible details. Generally, Developers think how to develop the application on the other hand the tester think that how the application is used by the end user.