License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2018.7
URN: urn:nbn:de:0030-drops-92128
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2018/9212/
Go to the corresponding LIPIcs Volume Portal


Mezzetti, Gianluca ; Møller, Anders ; Torp, Martin Toldam

Type Regression Testing to Detect Breaking Changes in Node.js Libraries

pdf-format:
LIPIcs-ECOOP-2018-7.pdf (0.7 MB)


Abstract

The npm repository contains JavaScript libraries that are used by millions of software developers. Its semantic versioning system relies on the ability to distinguish between breaking and non-breaking changes when libraries are updated. However, the dynamic nature of JavaScript often causes unintended breaking changes to be detected too late, which undermines the robustness of the applications.
We present a novel technique, type regression testing, to automatically determine whether an update of a library implementation affects the types of its public interface, according to how the library is being used by other npm packages. By leveraging available test suites of clients, type regression testing uses a dynamic analysis to learn models of the library interface. Comparing the models before and after an update effectively amplifies the existing tests by revealing changes that may affect the clients.
Experimental results on 12 widely used libraries show that the technique can identify type-related breaking changes with high accuracy. It fully automatically classifies at least 90% of the updates correctly as either major or as minor or patch, and it detects 26 breaking changes among the minor and patch updates.

BibTeX - Entry

@InProceedings{mezzetti_et_al:LIPIcs:2018:9212,
  author =	{Gianluca Mezzetti and Anders M\oller and Martin Toldam Torp},
  title =	{{Type Regression Testing to Detect Breaking Changes in Node.js Libraries}},
  booktitle =	{32nd European Conference on Object-Oriented Programming  (ECOOP 2018)},
  pages =	{7:1--7:24},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-079-8},
  ISSN =	{1868-8969},
  year =	{2018},
  volume =	{109},
  editor =	{Todd Millstein},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2018/9212},
  URN =		{urn:nbn:de:0030-drops-92128},
  doi =		{10.4230/LIPIcs.ECOOP.2018.7},
  annote =	{Keywords: JavaScript, semantic versioning, dynamic analysis}
}

Keywords: JavaScript, semantic versioning, dynamic analysis
Collection: 32nd European Conference on Object-Oriented Programming (ECOOP 2018)
Issue Date: 2018
Date of publication: 10.07.2018
Supplementary Material: ECOOP Artifact Evaluation approved artifact available at http://dx.doi.org/10.4230/DARTS.4.3.8


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI