Not logged in.

Contribution Details

Type Bachelor's Thesis
Scope Discipline-based scholarship
Title Developers’ Perception of Unit Test Quality An Empirical Investigation of Unit Test Quality from a Developer’s Point of View
Organization Unit
Authors
  • Cristian De Iaco
Supervisors
  • Alberto Bacchelli
  • Giovanni Grano
  • Fabio Palomba
Language
  • English
Institution University of Zurich
Faculty Faculty of Business, Economics and Informatics
Date 2020
Abstract Text "How good are my tests?", "did I test enough?" These are common questions raised by developers and thus extensively investigated by the research community. Code coverage is most commonly consulted as a readily available metric to assess unit test quality. However, code coverage is not a sufficient indicator of unit test quality, as it does not account for the behavior of the production code. Therefore, novel approaches need to go beyond code coverage to assess the quality of a unit test based on different aspects such as understandability, maintainability and the ability to find faults. This thesis aims to bridge this gap by investigating unit test quality from a developer’s point of view to understand the areas of interest when dealing with unit tests. To that end, a taxonomy of most important characteristics of unit tests was elaborated based on the feedback gathered from 5 developers during interviews and from 70 developers in the survey. Additionally, I investigated the most prevalent unit testing practices applied by developers of this study, to provide an insight on how developers currently assess unit test quality. The results of this study show the scope of a unit test as the main area of interest to judge its quality named by 67% of developers of this study and judged to be at least very important by 82% of them. Readability is regarded as the second most important characteristic of a high-quality unit test, being reported by57% of developers and judged to be at least very important in 81% of those cases. The third most stated feature of unit test quality is the general structure of the test (33% of developers, rated as at least very important in 86% of the reported features attributed to the test structure). Moreover, 40% of the features named in the survey are found to be assessed in practice, where manual control in the form of peer review and observation of test results prevail as the predominant practices applied by developers of this study to assess unit test quality.
Zusammenfassung "Wie gut sind meine Tests?", "habe ich genug getestet?" Sind oft gestellte Fragen von Entwicklern und sind ausführlich untersucht von der Forschungsgemeinschaft. Codeabdeckungstools wer-den oft benutzt um die Qualität von Modultests (Unit Tests) einzuschätzen. Die Aussagekraft von Codeabdeckungstools ist jedoch zu limitiert um die Qualität eines Modultests zu beurteilen, da es das Verhalten des getesteten Produktionscodes nicht miteinberechnet. Neue Ansätze zur Beurteilung der Qualität von Modultests müssen deshalb über die Codeabdeckung hinausgehen, um andere Aspekte wie die Verständlichkeit, Wartbarkeit und die Fähigkeit des Modultests Fehler zu signalisieren miteinbeziehen. Das Ziel dieser Arbeit ist es, die Wahrnehmung der Entwickler bezüglich der Qualität von Modultests zu untersuchen und damit entsprechend zum Schliessen dieser Lücke beizutragen. Dafür wurde empirisch eine Taxonomie der wichtigsten von Entwickler genannten Faktoren in Bezug auf die Qualität von Modultests erarbeitet. Dazu habe ich 5 Entwickler interviewt und 70 Entwickler in Form einer Umfrage nach den Faktoren die entscheidend die Qualität von Modultests beeinflussen befragt. Zusätzlich konnten die Teil-nehmer der Umfrage für jeden Faktor, ihre täglich angewandten Massnahmen zur Erfassung der Qualität dieses Faktors nennen. Die Ergebnisse dieser Arbeit zeigen, dass Entwickler besonders interessiert am Umfang des vom Modultest ausgeführten Produktionscodes sind. Dieser Meinung teilten 67% der Teilnehmer der Umfrage, welche diesen Faktor zu 82% mindestens als sehr wichtig empfanden. Die Lesbarkeit des Modultests wurde von 57% der Teilnehmer als wichtigen Faktor empfunden, darunter schätzen sie die Lesbarkeit zu 81% mindestens als sehr wichtig ein. Als dritthäufigsten Faktor wurde der generelle Aufbau des Modultests genannt (33% der Entwickler, darunter von 86% mindestens als sehr wichtig empfunden). Weiterhin wurden 40% der genannten Faktoren von Entwicklern in der Umfrage täglich erfasst, dabei ist die manuelle Kontrolle der Modultests in Form von Code Review oder die Beobachtung des Resultats nach ihrer Ausführung die am häufigsten genannten Massnahmen.
PDF File Download
Export BibTeX