Skip to content
Preprint

Characterizing Structural Testability in JavaScript: An Empirical Study

Jul 2026 · 0 citations · 29 references
Computer Science

TL;DR

This paper operationalizes structural testability as a seven-dimensional construct capturing controllability, observability, branching complexity, asynchronous coordination, event-driven behaviour, encapsulation, and side-effect intensity and applies this framework to 30 open-source JavaScript projects spanning diverse domains and sizes.

Abstract

Software testability has long been recognized as a software quality attribute that influences testing effort and effectiveness. While prior work has extensively studied testability in object-oriented and concurrent software, comparatively little is known about structural testability in modern JavaScript systems. JavaScript applications rely on asynchronous execution, event-driven control flow, closures, and dynamic interactions that are not explicitly captured by existing testability frameworks. This paper presents a large-scale empirical study of structural testability in JavaScript. We operationalize structural testability as a seven-dimensional construct capturing controllability, observability, branching complexity, asynchronous coordination, event-driven behaviour, encapsulation, and side-effect intensity. These dimensions are derived from AST-based static analysis and aggregated into a Composite Testability Score (CTS) for comparative analysis across functions, files, and projects. We apply this framework to 30 open-source JavaScript projects spanning diverse domains and sizes. Our analysis characterizes the distribution of structural testability, identifies recurring structural archetypes among low-CTS functions, and examines associations between project characteristics and testability. We find that structurally-challenging functions are concentrated within a relatively small subset of files and arise through multiple recurring structural configurations rather than a single dominant pattern. These findings provide new insight into structural testability in JavaScript and establish a foundation for future research on testing effort, automated test generation, testability-aware refactoring, and software quality assessment.

View source

Similar papers

Conference Aug 2026

Toward Improving Software Functionality through Refactoring Operations: An Experimental Study

Refactoring is widely used to improve internal software quality; however, its impact on external functionality remains insufficiently explored. This study investigates how different refactoring operations influence software functionality through a controlled experimental analysis. A set of ten commonly used refactoring operations was applied to the jEdit system. Software functionality was quantitatively evaluated using a composite metric derived from cohesion, polymorphism, interface size, design size, and inheritance hierarchy. The selected ten refactoring operations were performed 453 times across ten independent experiments in jEdit. The results reveal that refactoring operations do not have uniform effects on functionality. Operations that enhance encapsulation and modular distribution significantly improve functionality, with Encapsulate Field achieving the highest increase. In contrast, operations that reduce abstraction, such as Inline Method and Inline Class, negatively impact functionality. Additionally, some operations show no measurable effect, indicating limitations in metric sensitivity. These findings demonstrate that refactoring should not be assumed to universally improve software functionality. Instead, its impact depends on the nature and context of the operations being applied. The study provides empirical evidence and practical guidance for selecting refactoring operations that effectively enhance functional quality while avoiding potential degradation.

Abdullah Almogahed, Manal Othman, M. Qasim et al. · 0 citations
Book Open access Jul 2026

Testing AIware Systems: A Software Engineering Survey

Overall, this survey provides a structured characterization of the current state of AIware testing research and identifies key structural challenges that must be addressed to support lifecycle-aware, reliable AIware systems.

K. Gonzalez, Mariam El Mezouar · 0 citations
Open access Aug 2026

Property-based testing in Python: empirical insights

These findings provide the largest empirical characterization of PBT in Python to date, highlight developers’ difficulties in adopting the technique, and expose limitations of current tool support.

Isadora Campos De Oliveira, Arthur Lisboa Corgozinho, Henrique Rocha et al. · 0 citations