Testing: Part Two

I am still trying hard to get into a testing state of mind. I have written straightforward unit tests on easily testable code. I have installed the CodeCoverage plugin for Netbeans.

I have done quite a bit of background on how best to next proceed. These are my findings:

  • An excellent Google article How to write hard to test code sheds some light on limiting Singleton use, construstors that do too much and dependency injection techniques.
  • Static analysis tools such as Findbugs, PMD and Testability Report help show problem areas in an existing code base.
  • Dependency Injection led me to reseach Google Guice and Spring
  • which, among other things, make it easy to generate the Factory pattern for existing objects
  • I read a good article on Java MVC which will aide in seperate business logic from the view.
  • If I intend to do functional testing on the Swing GUI, it looks like fest is the best library to use
  • For simplication of mock object generation, mockito is recommended.
  • A goal in mind once most of the code base is covered is to do continuous integration within hudson.

As you can see, the world of software quality control and testing has evolved into complex tools and a lot of work. Time will show just how worthwhile the efforts payoff to be.

Add new comment