|
- The Test-First Stoplight
- http://users.vnet.net/wwake/xp/xp0101/index.shtml
- Extreme Programmers write tests before they write the corresponding production code. In "test-first programming," you start with a small test, then write just enough code to implement it, and continue with the next test until the code is done.
The Test-First Stoplight
Test-first programming is like a stoplight. A normal stoplight has green, yellow, and red lights. It starts green, goes yellow, then red, and back to green again. Occasionally, you come across a light where the pattern is different, perhaps blinking yellow or blinking red. When you see this, you pay extra attention, and say "What's going on?"
For unit testing in Java, many projects use the JUnit testing framework, available at www.junit.org. It shows a green bar when all tes...
|