Is Assertion Roulette still a test smell? An experiment from the perspective of testing education

Published:

Recommended citation:

Gina R. Bai, Kai Presler-Marshall, Susan R. Fisk, and Kathryn T. Stolee. 2022. Is Assertion Roulette still a test smell? An experiment from the perspective of testing education. In 2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC 2022), September 12 - September 16, 2022, Rome, Italy.


[Full Paper]

Abstract

Test smells are commonly perceived as having a negative impact on software maintainability and correctness. Research has shown that Assertion Roulette is the most pervasive smell in industrial and open-source systems. However, some recent studies argue that the impact of Assertion Roulette is not as severe as previously believed, and developers usually consider it acceptable.

The controversy over the impact of Assertion Roulette also exists in the area of testing education. To assess the impact of Assertion Roulette, we conducted a controlled empirical study with 42 CS students. We recruited participants from two populations, CS1 and a graduate testing course, to see what role experience may have in terms of this test smell’s impact. Participants were tasked with implementing a project in Java that passes provided JUnit tests. Through analysis of student-authored source code, we measured the impact of Assertion Roulette using code quality measures and testing behavior measures. Our findings show that the impact of Assertion Roulette on students in this study was minimal. Though students with exposure to the test smell began testing significantly later, they performed similarly in terms of programming quality measures. Thus, it would seem the Assertion Roulette smell is no longer a smell at all, even for less experienced populations like students.