Background. Test-Driven Development (TDD) is an agile software development practice, which encourages developers to write "quickand-dirty"production code to make tests pass, and then apply refactoring to "clean"written code. However, previous studies have found that refactoring is not applied as often as the TDD process requires, potentially affecting software quality. Aims. We investigated the benefits of leveraging a Static Analysis Tool (SAT)-plugged-in the Integrated Development Environment (IDE)-on software quality, when applying TDD. Method. We conducted two controlled experiments, in which the participants-92, in total-performed an implementation task by applying TDD with or without a SAT highlighting the presence of code smells in their source code. We then analyzed the effect of the used SAT on software quality. Results. We found that, overall, the use of a SAT helped the participants to significantly improve software quality, yet the participants perceived TDD more difficult to be performed. Conclusions. The obtained results may impact: (i) practitioners, helping them improve their TDD practice through the adoption of proper settings and tools; (ii) educators, in better introducing TDD within their courses; and (iii) researchers, interested in developing better tool support for developers, or further studying TDD.

Do Static Analysis Tools Affect Software Quality when Using Test-driven Development?

Zampetti F.;Di Penta M.;
2022-01-01

Abstract

Background. Test-Driven Development (TDD) is an agile software development practice, which encourages developers to write "quickand-dirty"production code to make tests pass, and then apply refactoring to "clean"written code. However, previous studies have found that refactoring is not applied as often as the TDD process requires, potentially affecting software quality. Aims. We investigated the benefits of leveraging a Static Analysis Tool (SAT)-plugged-in the Integrated Development Environment (IDE)-on software quality, when applying TDD. Method. We conducted two controlled experiments, in which the participants-92, in total-performed an implementation task by applying TDD with or without a SAT highlighting the presence of code smells in their source code. We then analyzed the effect of the used SAT on software quality. Results. We found that, overall, the use of a SAT helped the participants to significantly improve software quality, yet the participants perceived TDD more difficult to be performed. Conclusions. The obtained results may impact: (i) practitioners, helping them improve their TDD practice through the adoption of proper settings and tools; (ii) educators, in better introducing TDD within their courses; and (iii) researchers, interested in developing better tool support for developers, or further studying TDD.
2022
9781450394277
Refactoring
Static Analysis Tool
Test-driven Development
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12070/55953
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 6
  • ???jsp.display-item.citation.isi??? ND
social impact