License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/DagSemProc.10111.3
URN: urn:nbn:de:0030-drops-26180
Go to the corresponding Portal

Alshahwan, Nadia ; Jia, Yue ; Lakhotia, Kiran ; Fraser, Gordon ; Shuler, David ; Tonella, Paolo

AUTOMOCK: Automated Synthesis of a Mock Environment for Test Case Generation

10111.TonellaPaolo.Paper.2618.pdf (0.2 MB)


During testing, there are several reasons to exclude some of the components used by the unit under test, such as: (1) the component affects the state of the world in an irreversible way; (2) the component is not accessible for testing purposes (e.g., a web service); (3) the component introduces a major performance degradation to the testing phase (e.g., due to long computations); (4) it is hard (i.e., statistically unlikely) to obtain the output required by the test from the component. In such cases, we replace the component with a mock one. In this paper, we integrate the synthesis of mock components with the generation of test cases for the current testing goal (e.g., coverage). To avoid the generation of meaningless data, which may lead to assertion violation not related to bugs, we include a weak mock postcondition. We consider ways to automatically synthesize such postcondition. We empirically evaluate the quality of the mocks generated by our approach, as well as the benefits mocks introduce in terms of improved coverage and improved performance of the test case generator.

BibTeX - Entry

  author =	{Alshahwan, Nadia and Jia, Yue and Lakhotia, Kiran and Fraser, Gordon and Shuler, David and Tonella, Paolo},
  title =	{{AUTOMOCK: Automated Synthesis of a Mock Environment for Test Case Generation}},
  booktitle =	{Practical Software Testing : Tool Automation and Human Factors},
  pages =	{1--4},
  series =	{Dagstuhl Seminar Proceedings (DagSemProc)},
  ISSN =	{1862-4405},
  year =	{2010},
  volume =	{10111},
  editor =	{Mark Harman and Henry Muccini and Wolfram Schulte and Tao Xie},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{},
  URN =		{urn:nbn:de:0030-drops-26180},
  doi =		{10.4230/DagSemProc.10111.3},
  annote =	{Keywords: Test case generation, code analysis, automated software testing}

Keywords: Test case generation, code analysis, automated software testing
Collection: 10111 - Practical Software Testing : Tool Automation and Human Factors
Issue Date: 2010
Date of publication: 28.06.2010

DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI