Automatically Assessing and Extending Code Coverage for NPM Packages
Typical Node.js applications extensively rely on packages hosted in the npm registry. As such packages may be used by thousands of other packages or applications, it is important to assess their code coverage. Moreover, increasing code coverage may help detect previously unknown issues. In this paper, we introduce TESA, a new tool that automatically assembles a test suite for any package in the npm registry. The test suite includes 1) tests written for the target package and usually hosted in its development repository, and 2) tests selected from dependent packages. The former tests allow assessing the code coverage of the target package, while the latter ones can increase code coverage by exploiting third-party tests that also exercise code in the target package. We use TESA to assess the code coverage of 500 popular npm packages. Then, we demonstrate that TESA can significantly increase code coverage by including tests from dependent packages. Finally, we show that the test suites assembled by TESA increase the effectiveness of existing dynamic program analyses to identify performance issues that are not detectable when only executing the developer’s tests.
Fri 21 MayDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
16:30 - 18:15 | Industrial case studies & Doctoral StudentsAST 2021 at AST Room Chair(s): Breno Miranda Federal University of Pernambuco | ||
16:30 15mShort-paper | Continuous Testing Improvement Model AST 2021 Maximiliano Agustin Mascheroni Universidad Nacional de La Plata, Emanuel Agustin Irrazábal Universidad Nacional del Nordeste, Gustavo Rossi Universidad Nacional de La Plata, LIFIA-Fac. Informatica, La Plata, Argentina Pre-print Media Attached | ||
16:45 30mLong-paper | Model-based Automation of Test Scripts Generation Across Product Variants: a Railway Perspective AST 2021 Alessio Bucaioni Mälardalen University, Fabio Di Silvestro Bombardier Railway Transportation, Inderjeet Singh Bombardier Railway Transportation, Mehrdad Saadatmand RISE Research Institutes of Sweden, Henry Muccini University of L'Aquila, Italy, Thorvaldur Jochumsson Bombardier Railway Transportation Pre-print Media Attached | ||
17:15 30mLong-paper | Using Machine Learning to Build Test Oracles: an Industrial Case Study on Elevators Dispatching Algorithms AST 2021 Aitor Arrieta University of Mondragon, Jon Ayerdi Mondragon Unibertsitatea, Miren Illarramendi Mondragon University, Aitor Agirre IKERLAN-IK4, Goiuria Sagardui University of Mondragon
, Maite Arratibel Orona Pre-print Media Attached | ||
17:45 30mLong-paper | Automatically Assessing and Extending Code Coverage for NPM Packages AST 2021 Haiyang Sun Università della Svizzera italiana, Andrea Rosà University of Lugano, Switzerland, Daniele Bonetta Oracle Labs, Walter Binder University of Lugano, Switzerland Media Attached |
Go directly to this room on Clowdr