Supporting Unit Test Generation via Automated Isolation

Authors

  • Dávid Honfi
    Affiliation
    Department of Measurement and Information Systems, Faculty of Electrical Engineering and Informatics, Budapest University of Technology and Economics, Hungary; MTA-BME Lendület Cyber-Physical Systems Research Group, Budapest, Hungary
  • Zoltán Micskei
    Affiliation
    Department of Measurement and Information Systems, Faculty of Electrical Engineering and Informatics, Budapest University of Technology and Economics, Hungary
https://doi.org/10.3311/PPee.9768

Abstract

Testing is a significantly time-consuming, yet commonly employed activity to improve the quality of software. Thus, techniques like dynamic symbolic execution were proposed for generating tests only from source code. However, current approaches usually could not create thorough tests for software units with dependencies (e.g. calls to file system or external services). In this paper, we present a novel approach that synthesizes an isolation sandbox, which interacts with the test generator to increase the covered behaviour in the unit under test. The approach automatically transforms the code of the unit under test, and lets the test generator choose values for parameters in the calls to dependencies. The paper presents a prototype implementation that collaborates with the IntelliTest test generator. The automated isolation is evaluated on source code from open-source projects. The results show that the approach can significantly increase the code coverage achieved by the generated tests.

Keywords:

testing, symbolic execution, unit testing, isolation, mocking

Citation data from Crossref and Scopus

Published Online

2017-02-10

How to Cite

Honfi, D., Micskei, Z. “Supporting Unit Test Generation via Automated Isolation”, Periodica Polytechnica Electrical Engineering and Computer Science, 61(2), pp. 116–131, 2017. https://doi.org/10.3311/PPee.9768

Issue

Section

Articles