Tests from Traces: Automated Unit Test Extraction for R
Unit tests are labor-intensive to write and maintain. This paper looks into the possibility of automatically generating tests for a software package from the execution traces of clients of that package. Our objectives are to reduce the effort in creating test suites, minimizing the number and size of individual tests while maximizing coverage. To evaluate the viability of our approach we selected a challenging target for automated test genration, namely R, a programming language that is popular for data science applications. The challenges presented by R are its extreme dynamism and the lack of types. The combination of these decrease the efficacy of traditional test generation techniques. We present Genthat, a tool that we have developed over the last couple of years to, non- invasively, record execution traces of R programs and extract unit tests from those traces. We have carried out an evaluation on 1.7M lines of R code. The unit tests generated by Genthat improved code coverage on average from 267,113 lines to 704,450 lines.
Tue 17 JulDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
16:00 - 17:30 | Test and Oracle GenerationISSTA Technical Papers at Zurich II Chair(s): Sarfraz Khurshid University of Texas at Austin | ||
16:00 20mTalk | Tests from Traces: Automated Unit Test Extraction for R ISSTA Technical Papers | ||
16:20 20mTalk | Translating Code Comments to Procedure Specifications ISSTA Technical Papers Arianna Blasi Università della Svizzera italiana (USI) and IMDEA Software Institute, Alberto Goffi Università della Svizzera italiana (USI), Konstantin Kuznetsov Saarland University, CISPA, Alessandra Gorla IMDEA Software Institute, Michael D. Ernst University of Washington, USA, Mauro Pezzè University of Milano-Bicocca, Italy, Sergio Delgado Castellanos IMDEA Software Institute | ||
16:40 20mTalk | PerfFuzz: Automatically Generating Pathological Inputs ISSTA Technical Papers Caroline Lemieux University of California, Berkeley, Rohan Padhye University of California, Berkeley, Koushik Sen University of California, Berkeley, Dawn Song | ||
17:20 10m | Q&A in groups ISSTA Technical Papers |