Most importantly: design to test .
This means that you need to have small independent components (which is almost always good, and not just for verification) and test the components separately. Inversion of control (with or without an IoC map, such as Spring) can help you in this area. When you have small components, it is fairly easy to test them using jUnit, easymock, or any other standard test utilities.
Testing the interface is the most tedious and boring task. Selenium can help you, but there are no silver bullets that I know of.
source share