Next: What should I test?
Up: Working Backwards with JUnit
Previous: What is a Unit
Contents
Index
- Test each part (unit) of the code in isolation.
- Create tests that retain their value over time.
- Create much larger regression tests that help demonstrate that the entire system still works (or not) after changes.
- In the XP view, if a program feature lacks an automated test it is assumed that it doesn't work.
- Unit tests ensure that we don't break one another's code.
- Reinforcement of the philosophy of working backwards.
- Test first, by intention.
- Write new code only when you have a test that doesn't work.
- Write code as if someone has already written the hard method for you, and you just have to send the message.
- Write the code you want to see without worrying about the infrastructure that supports it.
- Testing affects the system design. Don't put code in places that are hard to test.
Next: What should I test?
Up: Working Backwards with JUnit
Previous: What is a Unit
Contents
Index