Skip to main content
OpenConf small logo

Providing all your submission and review needs
Abstract and paper submission, peer-review, discussion, shepherding, program, proceedings, and much more

Worldwide & Multilingual
OpenConf has powered thousands of events and journals in over 100 countries and more than a dozen languages.


ZIP
1.8MB

Test-Driven Development Versus Test Smells: An Empirical Study With Students From Ufabc University

Context: The practice of writing tests before production code (Test-Driven Development, TDD for short) has become widespread in the software community, aiming to improve code quality and reduce defects. However, inconsistent reporting on TDD's effect provides room to explore its impact on test code.

Objectives: This pilot study investigated whether TDD can reduce the prevalence of test smells in student-written code, addressing the question of whether TDD improves test code quality.

Method: We employed a controlled intervention within an undergraduate programming context. Initially students developed the String Calculator kata using their standard, unconstrained method, subsequently we introduced TDD and later students re-implemented the same kata adhering to TDD principles. Test code quality was assessed using established test smell detection tools and qualitative feedback was gathered through student interviews.

Results: Despite improvements in code quality metrics, students continued to generate "Magic Number" test smell in their test code.

Conclusion: This pilot study highlights the need for educators to emphasize comprehensive test design alongside TDD implementation, acknowledging the limitations inherent in a small-scale exploratory research setting.

Matheus Marabesi
Universidad de Salamanca
Spain

Alicia García-Holgado
Universidad de Salamanca
Spain

Francisco José García-Peñalvo
Universidad de Salamanca
Spain

Juliana Cristina Braga
Universidade Federal do ABC
Brazil

Ismar Frango Silveira
Universidade Presbiteriana Mackenzie
Brazil