---
title: "Automated unit Bestpractise"
author: "alanwu"
date: "2008-03-20T13:46:19Z"
tags: []
slug: "automated-unit-bestpractise"
draft: false
lastmod: "2008-03-20T13:46:19Z"
id: 174093
url: "https://alanwu.iteye.com/blog/174093"
---

Automated unit testing
	Continuous integration software--CruiseControl
	Yes...
		More code needs to be written
		Estimates will increase
		It's a new way of working
		It feels weired,perhaps pointless initially
	But...
		Automated unit testing is very powerfull
		Lets you regression test code for free!
		Helps you write cheaner code
		Provides a good milestone for completion
		Provides confidence when changing, fixing or refactoring code
		If you can write code, you can write a unit test!
	A defect is raised...
		Look at the unit tests
		Write a unit test to prove the bug -- make sure its reproducible
		Fix the bug
		The new test will pass
		Check-in the fix and new test
		Chances of reoccurrence are greatly reduced

Continuous integration
Project blogs -- Pebble
	
Tracking metrics over time -- QALab

http://www.scribd.com/doc/387095/Java-Development-Best-Practices