• DocumentCode
    3112748
  • Title

    Synthesize It: From Design by Contract to Meaningful Test Input Data

  • Author

    Galler, Stefan J. ; Weiglhofer, Martin ; Wotawa, Franz

  • Author_Institution
    Inst. for Software Technol., Graz Univ. of Technol., Graz, Austria
  • fYear
    2010
  • fDate
    13-18 Sept. 2010
  • Firstpage
    286
  • Lastpage
    295
  • Abstract
    Generating test input data is a complex task and nowadays mostly tackled with random approaches. Random testing of methods, which take non primitive data types as parameters, e.g. objects encapsulating database interactions, is a vain endeavor. Especially, if the precondition of the method under test (MUT) requires a particular object state of the method´s parameters, random approaches rarely succeed. In this paper we present a technique to automatically synthesize implementations for the parameters of a MUT from a given Design by Contract specification. These implementations behave as described by the Design by Contract specification, but do not interact with their environment (e.g. database, network and file system). Furthermore, we can set the initial state of the synthesized implementations to the state required by the MUT´s precondition. Besides a formal discussion of our approach we present results obtained by applying our technique to two case studies: a stack-based calculator and a real-world data collection tool from the telecommunication industry. The presented approach outperforms random data generation on both case studies in terms of amount of methods tested (function coverage) and line coverage.
  • Keywords
    contracts; program testing; software engineering; MUT; contract specification; meaningful test input data; method under test; objects encapsulating database interactions; primitive data types; real-world data collection tool; stack based calculator; synthesized implementations; telecommunication industry; Arrays; Concrete; Contracts; Databases; Indium phosphide; Software; Testing; Design by Contract; automated testing; synthesizing mock behavior; test data generation;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering and Formal Methods (SEFM), 2010 8th IEEE International Conference on
  • Conference_Location
    Pisa
  • Print_ISBN
    978-1-4244-8289-4
  • Type

    conf

  • DOI
    10.1109/SEFM.2010.33
  • Filename
    5637153