The Effect of Test-Driven Development on Program Code
Usage of test-driven development (TDD) is said to lead to better testable programs. However, no study answers either the question how this better testability can be measured nor whether the feature of better testability exists. To answer both questions we present the concept of the controllability of assignments. We studied this metric on various TDD and conventional projects. Assignment controllability seems to support the rules of thumb for testable code, e.g. small classes with low coupling are better testable than large classes with high coupling. And as opposed to the Chidamber and Kemerer metric suite for object-oriented design, controllability of assignments seems to be an indicator whether a project was developed with TDD or not.
KeywordsProgram Code Method Level Testable Code Student Project Object Oriented Design
Unable to display preview. Download preview PDF.
- 2.Pancur, M., Ciglaric, M., Trampus, M., Vidmar, T.: Towards empirical evaluation of test-driven development in a university environment. In: EUROCON 2003. Computer as a Tool. The IEEE Region 8, vol. 2, pp. 83–86 (2003)Google Scholar
- 3.George, B., Williams, L.: An initial investigation of test driven development in industry. In: ACM symposium on Applied computing, Melbourne, Florida, USA, pp. 1135–1139 (2003)Google Scholar
- 4.Geras, A., Smith, M., Miller, J.: A prototype empirical evaluation of test driven development. In: International Symposium on Software Metrics (Metrics), Chicago, Illinois, USA, pp. 405–416 (2004)Google Scholar
- 9.Abramovici, M., Breuer, M., Friedman, A.: Digital Systems Testing and Testable Design. Computer Science Press, Rockville (1990)Google Scholar
- 10.Apache: Byte code engineering library (BCEL), http://jakarta.apache.org/bcel/index.html
- 11.Canoo: Webtest, http://webtest.canoo.com
- 12.Apache: Ant, http://ant.apache.org/
- 13.Apache: Log4j, http://logging.apache.org/
- 14.Hollander, M., Wolfe, D.: Noparametric Statistical Methods, 2nd edn. John Wiley & Sons, Chichester (1999)Google Scholar
- 16.Wilson, D.: Teaching xp: A case study. In: XP Universe, Raleigh, NC, USA (2001)Google Scholar