DyGen: automatic generation of high-coverage tests via mining gigabytes of dynamic traces

  • Authors:
  • Suresh Thummalapenta;Jonathan de Halleux;Nikolai Tillmann;Scott Wadsworth

  • Affiliations:
  • Department of Computer Science, North Carolina State University, Raleigh, NC;Microsoft Research, Redmond, WA;Microsoft Research, Redmond, WA;Microsoft Research, Redmond, WA

  • Venue:
  • TAP'10 Proceedings of the 4th international conference on Tests and proofs
  • Year:
  • 2010

Quantified Score

Hi-index 0.01

Visualization

Abstract

Unit tests of object-oriented code exercise particular sequences of method calls. A key problem when automatically generating unit tests that achieve high structural code coverage is the selection of relevant method-call sequences, since the number of potentially relevant sequences explodes with the number of methods. To address this issue, we propose a novel approach, called DyGen, that generates tests via mining dynamic traces recorded during program executions. Typical program executions tend to exercise only happy paths that do not include error-handling code, and thus recorded traces often do not achieve high structural coverage. To increase coverage, DyGen transforms traces into parameterized unit tests (PUTs) and uses dynamic symbolic execution to generate new unit tests for the PUTs that can achieve high structural code coverage. In this paper, we show an application of DyGen by automatically generating regression tests on a given version of software.