|
|
|
|
|
by herge
2663 days ago
|
|
Maybe the spry takeaway is that you should write tests for things you want to make sure they will not break. Your UI being off by a pixel won't break your application, so if a test hangs on that, then it is not a good test. However, your business logic, or network protocol routine, those should not break even if you heavily refactor or add new features (especially business logic where a broken behaviour might seem correct), so those need to be heavily tested. If it is hard to test the juicy parts like business logic without also dragging in the UI, different OS/platform/db parts, etc, then you should look at how your application is structured and if it is really optimized for writing good tests. |
|
You should also write tests for things that are already broken before you work on the fix so that you can be sure it's actually fixed. Basically the red/green/refactor cycle[1] from TDD.
[1] http://www.brendanconnolly.net/test-driven-testing-red-green...