An Exploratory Study on the Usage and Readability of Messages Within Assertion Methods of Test Cases

03/01/2023
by   Taryn Takebayashi, et al.
0

Unit testing is a vital part of the software development process and involves developers writing code to verify or assert production code. Furthermore, to help comprehend the test case and troubleshoot issues, developers have the option to provide a message that explains the reason for the assertion failure. In this exploratory empirical study, we examine the characteristics of assertion messages contained in the test methods in 20 open-source Java systems. Our findings show that while developers rarely utilize the option of supplying a message, those who do, either compose it of only string literals, identifiers, or a combination of both types. Using standard English readability measuring techniques, we observe that a beginner's knowledge of English is required to understand messages containing only identifiers, while a 4th-grade education level is required to understand messages composed of string literals. We also discuss shortcomings with using such readability measuring techniques and common anti-patterns in assert message construction. We envision our results incorporated into code quality tools that appraise the understandability of assertion messages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/07/2022

What Makes a Good Commit Message?

A key issue in collaborative software development is communication among...
research
03/07/2023

Do the Test Smells Assertion Roulette and Eager Test Impact Students' Troubleshooting and Debugging Capabilities?

To ensure the quality of a software system, developers perform an activi...
research
07/29/2021

Developers perception on the severity of test smells: an empirical study

Unit testing is an essential component of the software development life-...
research
07/31/2019

Comprehending Test Code: An Empirical Study

Developers spend a large portion of their time and effort on comprehendi...
research
03/27/2021

An empirical study into the relationship between class features and test smells

While a substantial body of prior research has investigated the form and...
research
06/13/2018

A Graphical Interactive Debugger for Distributed Systems

Designing and debugging distributed systems is notoriously difficult. Th...
research
10/26/2020

How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation

Refactoring is the art of improving the design of a system without alter...

Please sign up or login with your details

Forgot password? Click here to reset