A 'back to basics' walk through of testing methodologies
Software Developer
Consultant
Educator
Writing working software is hard
Understanding someone else's code is hard
Responding to change is hard
Makes writing working software easier
Helps in understanding the code of others
Makes responding to change easier
Makes writing working software harder
Understanding the tests of others is hard
Makes responding to change harder
Your code base
Your process
Your co-worker
(Yah that one)
If your tests do not provide you with at least 2 of those benefits then I would question their effectiveness
Assumes you are writing good tests.
Less bugs is a hard number to quantify in any given project.
Easier to respond to change is super subjective.
Test your application/business logic
Test methods and classes that have state and logic.
Test error prone or complicated systems
Test "mission critical" systems
Test as you go
Do not test your framework
Do not test your language
Don't test your UI*
Do not test 3rd party libraries or services
Don't test your mocks
Did x occur when I did y
Did I get x back when I did y
Loops
Randomness
UI / Output
State