Test driven development
Test driven development (TDD) is a development methodology where test cases drive development. The middle D in TDD signifies that tests drive development. You start by writing a test case, which will fail initially. You then define an interface and provide minimal implementation for the test to pass and then iterate over the implementation. By writing test cases first, you get better understanding of functional requirements and hence create better design.
Unit testing
Cost of fixing a bug goes up exponentially based on when it is discovered. If a developer finds a bug when coding, it is very cheap to fix. If the bug is found by QE, it is more expensive to fix. If a customer finds a bug, it is expensive by an order of magnitude to fix it. Hence, even though there is upfront cost to creating unit tests, it will be easily recouped in a short period of time. Apart from cost savings, there are many other benefits to unit testing. It makes you create modular and cleaner interfaces. It increases your confidence in the product. It is especially helpful in ensuring functional integrity if your code base changing frequently.
Automated unit testing and Continuous integration
Automated unit testing is complementary to test driven development and can be carried out through continuous integration process. It consists of a servers which runs the build and then all unit tests either periodically or after every check-in. In addition to automated unit testing, continuous integration process can be setup to run a variety of static code analysis tools for finding bugs, checking code style, etc. It helps in monitoring and improving the quality of the code. Continuous integration also brings in the confidence that your code is ready to ship.
Test driven development (TDD) is a development methodology where test cases drive development. The middle D in TDD signifies that tests drive development. You start by writing a test case, which will fail initially. You then define an interface and provide minimal implementation for the test to pass and then iterate over the implementation. By writing test cases first, you get better understanding of functional requirements and hence create better design.
Unit testing
Cost of fixing a bug goes up exponentially based on when it is discovered. If a developer finds a bug when coding, it is very cheap to fix. If the bug is found by QE, it is more expensive to fix. If a customer finds a bug, it is expensive by an order of magnitude to fix it. Hence, even though there is upfront cost to creating unit tests, it will be easily recouped in a short period of time. Apart from cost savings, there are many other benefits to unit testing. It makes you create modular and cleaner interfaces. It increases your confidence in the product. It is especially helpful in ensuring functional integrity if your code base changing frequently.
Automated unit testing and Continuous integration
Automated unit testing is complementary to test driven development and can be carried out through continuous integration process. It consists of a servers which runs the build and then all unit tests either periodically or after every check-in. In addition to automated unit testing, continuous integration process can be setup to run a variety of static code analysis tools for finding bugs, checking code style, etc. It helps in monitoring and improving the quality of the code. Continuous integration also brings in the confidence that your code is ready to ship.