How to develop unit tests

This page will be getting more details about Hadoop testing and unit test development guidelines.

Cheat sheet of tests development for JUnit v4

Hadoop has been using JUnit4 for awhile now, however it seems that many new tests are still being developed for JUnit v3. It is partially JUnit's fault because for the false sense of backward compatibility all v3 junit.framework classes are packaged along with v4 classes and it all is called junit-4.5.jar. Speaking of a good release management principles :-)

Here's the short list of traps one need to be aware and not to develop yet another JUnit v3 test case

import static org.junit.Assert.assertTrue;

or all of them at once

import static org.junit.Assert.*;

Did you find the above not to be clear enough? Read Quick tutorial right from JUnit website.

HowToDevelopUnitTests (last edited 2009-09-20 23:54:03 by localhost)