kirancodes.me
To Proof Maintenance & Beyond!

Automated unit test generation for classes with environment dependencies

Andrea Arcuri, Gordon Fraser, Juan Pablo Galeotti

Abstract

Automated test generation for object-oriented software typically consists of producing sequences of calls aiming at high code coverage. In practice, the success of this process may be inhibited when classes interact with their environment, such as the file system, network, user-interactions, etc. This leads to two major problems: First, code that depends on the environment can sometimes not be fully covered simply by generating sequences of calls to a class under test, for example when execution of a branch depends on the contents of a file. Second, even if code that is environment-dependent can be covered, the resulting tests may be unstable, i.e., they would pass when first generated, but then may fail when executed in a different environment. For example, tests on classes that make use of the system time may have failing assertions if the tests are executed at a different time than when they were generated.

BibTeX
@inproceedings{Arcuri-al:ASE14,
  author    = {Andrea Arcuri and
               Gordon Fraser and
               Juan Pablo Galeotti},
  title     = {Automated unit test generation for classes with environment dependencies},
  booktitle = {ASE},
  pages     = {79--90},
  publisher = {{ACM}},
  year      = {2014},
}

Related papers