Title :
An empirical study of testing file-system-dependent software with mock objects
Author :
Marri, Madhuri R. ; Xie, Tao ; Tillmann, Nikolai ; De Halleux, Jonathan ; Schulte, Wolfram
Author_Institution :
Dept. of Comput. Sci., North Carolina State Univ., Raleigh, NC
Abstract :
Unit testing is a technique of testing a single unit of a program in isolation. The testability of the unit under test can be reduced when the unit interacts with its environment. The construction of high-covering unit tests and their execution require appropriate interactions with the environment such as a file system or database. To help set up the required environment, developers can use mock objects to simulate the behavior of the environment. In this paper, we present an empirical study to analyze the use of mock objects to test file-system-dependent software. We use a mock object of the FileSystem API provided with the Pex automatic testing tool in our study. We share our insights gained on the benefits of using mock objects in unit testing and discuss the faced challenges.
Keywords :
application program interfaces; automatic test equipment; program testing; FileSystem API; Pex automatic testing tool; database; file system; file-system-dependent software testing; mock objects; testability; unit under test; Automatic testing; Computer science; Databases; File systems; Logic; Software testing; System testing;
Conference_Titel :
Automation of Software Test, 2009. AST '09. ICSE Workshop on
Conference_Location :
Vancouver, BC
Print_ISBN :
978-1-4244-3711-5
DOI :
10.1109/IWAST.2009.5069054