Archive for August, 2007

Test Driven Development – Best practices

August 30 2007No Commented

Categorized Under: Uncategorized

Here are my practice when apply TDD, your idea is welcome:

Write the simple test first, then write code. After that write test code for more complexity functionality
Keep test code as simple as possible
Run test immediately whenever complete writing code
If spending much time for writing code, break the functionality into smaller ones and applying TDD for [...]

Enhance the Unit test using Annotation approach

August 28 2007No Commented

Categorized Under: Java, Software Engineer

New unit test tools base on Java 5 annotation features provide the better approach of re-use test code. JUnit4 provides the excellent annotation RunWith. The description of RunWith is copied from Junit4 javadoc:
“When a class is annotated with @RunWith or extends a class annotated with @RunWith, JUnit will invoke the class it references to run [...]