Comprehending Test Code: An Empirical Study

07/31/2019
by   Chak Shun Yu, et al.
0

Developers spend a large portion of their time and effort on comprehending source code. While many studies have investigated how developers approach these comprehension tasks and what factors influence their success, less is known about how developers comprehend test code specifically, despite the undisputed importance of testing. In this paper, we report on the results of an empirical study with 44 developers to understand which factors influence developers when comprehending Java test code. We measured three dependent variables: the total time spent reading a test suite, the ability to identify the overall purpose of a test suite, and the ability to produce additional test cases to extend a test suite. The main findings of our study, with several implications for future research and practitioners, are that (i) prior knowledge of the software project decreases the total reading time, (ii) experience with Java affects the proportion of time spent on the Arrange and Assert sections of test cases, (iii) experience with Java and prior knowledge of the software project positively influence the ability to produce additional test cases of certain categories, and (iv) experience with automated tests is an influential factor towards understanding and extending an automated test suite.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/16/2019

RTj: a Java framework for detecting and refactoring rotten green test cases

Rotten green tests are passing tests which have, at least, one assertion...
research
06/03/2019

Empirical Analysis of Factors and their Effect on Test Flakiness - Practitioners' Perceptions

Developers always wish to ensure that their latest changes to the code b...
research
03/17/2023

Using causal inference and Bayesian statistics to explain the capability of a test suite in exposing software faults

Test effectiveness refers to the capability of a test suite in exposing ...
research
09/30/2022

Towards effective assessment of steady state performance in Java software: Are we there yet?

Microbenchmarking is a widely used form of performance testing in Java s...
research
03/01/2023

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

Unit testing is a vital part of the software development process and inv...
research
05/05/2023

Hearing the voice of experts: Unveiling Stack Exchange communities' knowledge of test smells

Refactorings are transformations to improve the code design without chan...
research
08/10/2017

Test Case Prioritization Techniques for Model-Based Testing: A Replicated Study

Recently, several Test Case Prioritization (TCP) techniques have been pr...

Please sign up or login with your details

Forgot password? Click here to reset