- May 8th, 2008 18:07
The point of reevaluating how I write my code with tests is to come up with a system that works the best for me. In order to figure out what I need I’m going to first step back and figure out why high order objectives are most important to me. This is the order of preferences.
- I prefer clean code over dirty code.
- I prefer effective tests over test coverage.
- I prefer test coverage over new functionality.
- I prefer fast test execution over slow test execution.
- I’m not sure if I prefer brittle tests or fast tests.
- I prefer tests in isolation over high level tests.
- I prefer to write the tests first and then the code.
- I must have isolated tests plus integrated tests.
- I’m not sure where I stand on state based testing vs. behavior based testing.
- I prefer to avoid using fixtures wherever possible.
- I prefer to avoid using mocks and stubs wherever possible.
- I will use them both if they are the right tool for the job.
- I’m agnostic towards readable tests and more inclined to read the test than the descriptions about the test.
- I prefer simplicity over complexity.
The context of my testing will be for Rails apps and the team is assumed to be one person only, me.