• DocumentCode
    2744862
  • Title

    Feedback-Directed Random Test Generation

  • Author

    Pacheco, Carlos ; Lahiri, Shuvendu K. ; Ernst, Michael D. ; Ball, Thomas

  • Author_Institution
    CSAIL, Massachusetts Inst. of Technol., Cambridge, MA
  • fYear
    2007
  • fDate
    20-26 May 2007
  • Firstpage
    75
  • Lastpage
    84
  • Abstract
    We present a technique that improves random test generation by incorporating feedback obtained from executing test inputs as they are created. Our technique builds inputs incrementally by randomly selecting a method call to apply and finding arguments from among previously-constructed inputs. As soon as an input is built, it is executed and checked against a set of contracts and filters. The result of the execution determines whether the input is redundant, illegal, contract-violating, or useful for generating more inputs. The technique outputs a test suite consisting of unit tests for the classes under test. Passing tests can be used to ensure that code contracts are preserved across program changes; failing tests (that violate one or more contract) point to potential errors that should be corrected. Our experimental results indicate that feedback-directed random test generation can outperform systematic and undirected random test generation, in terms of coverage and error detection. On four small but nontrivial data structures (used previously in the literature), our technique achieves higher or equal block and predicate coverage than model checking (with and without abstraction) and undirected random generation. On 14 large, widely-used libraries (comprising 780KLOC), feedback-directed random test generation finds many previously-unknown errors, not found by either model checking or undirected random generation.
  • Keywords
    program testing; error detection; failing tests; feedback-directed random test generation; passing tests; Contracts; Error correction codes; Feedback; Filters; Law; Legal factors; Object oriented modeling; Open source software; Software testing; System testing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering, 2007. ICSE 2007. 29th International Conference on
  • Conference_Location
    Minneapolis, MN
  • ISSN
    0270-5257
  • Print_ISBN
    0-7695-2828-7
  • Type

    conf

  • DOI
    10.1109/ICSE.2007.37
  • Filename
    4222570