Quality of Test Design in Test Driven Development

University dissertation from Västerås : Mälardalen University

Abstract: One of the most emphasised software testing activity in an Agile environment is the usage of the Test Driven Development (TDD) approach. Interestingly, TDD is by definition a development activity where test cases are created by developers before writing the code, and all for the purpose of guiding the actual development process. In other words, test cases created when following TDD practice could be considered as a by-product of software development. A large number of scientific studies have been performed to investigate claimed benefits of the code quality improvements when following the TDD approach, while very few studies focused on investigating the quality of test cases produced when using TDD. At the same time, respondents from our industrial survey are pointing out that TDD is the most preferred but least practised activity, making it evident how TDD is still not fully adopted in industry.In this thesis we present our recent research results in identifying and categorising appropriate quality attributes which describe the quality of test case design when following the Test Driven Development approach. In two academic and one industrial empirical studies, we have clearly noticed the effect of positive test bias, i.e. the lack of negative test cases. On an average, in our studies, around 70% of test cases created by the participants were positive while 30% were negative. However, when measuring effectiveness and quality of those sets of test cases, an opposite ratio was observed. Effectiveness and quality of negative test cases were above 70% while positive test cases contributed only by 30%.We propose a TDDHQ concept as an approach for achieving higher quality testing in TDD by using combinations of quality improvement aspects and test design techniques to facilitate consideration of unspecified requirements during the development to a higher extent and thus minimise the impact of a potentially inherent effect of positive test bias in TDD. This way developers do not necessarily focus only on verifying functionality, but they can as well increase security, robustness, performance and many other quality improvement aspects for the given software product. An additional empirical study to evaluate this method resulted in 17% better quality of test cases created by developers utilising TDDHQ concept. Our research findings are expected to pave way for further enhancements to the way of performing TDD, eventually resulting in better adoption of it by the industry.

  This dissertation MIGHT be available in PDF-format. Check this page to see if it is available for download.