Extracting tests from runtime behavior for R
Unit tests are labor-intensive to write and maintain. In this talk we look into how well unit tests for a target software package can be extracted from the execution traces of client code. Our objective is to reduce the effort involved in creating test suites while minimizing the number and size of individual tests, and maximizing coverage. To evaluate the viability of our approach, we have chosen R, a programming language that is popular for data science applications. The challenges presented by R are its extreme dynamism, coerciveness, and lack of types. This combination decrease the efficacy of traditional test extraction techniques. We present Genthat, a tool 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,545 packages comprising 1.7M lines of code. The tests extracted by Genthat improved code coverage from original 19% to 53%. The running time of the generated tests is 1.9 times faster than the code they came from.
Fri 20 JulDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | |||
11:00 5mDay opening | Welcome ISAGT Chris Laffra Uber Technologies | ||
11:05 25mTalk | Automatic Python test generation ISAGT Chris Laffra Uber Technologies | ||
11:30 30mTalk | Extracting tests from runtime behavior for R ISAGT Filip Křikava Czech Technical University | ||
12:00 30mTalk | Computer-aided unit-test generation with UTA ISAGT |