TY - GEN
T1 - An empirical study of testing file-system-dependent software with mock objects
AU - Marri, Madhuri R.
AU - Xie, Tao
AU - Tillmann, Nikolai
AU - De Halleux, Jonathan
AU - Schulte, Wolfram
PY - 2009
Y1 - 2009
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=70349676206&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=70349676206&partnerID=8YFLogxK
U2 - 10.1109/IWAST.2009.5069054
DO - 10.1109/IWAST.2009.5069054
M3 - Conference contribution
AN - SCOPUS:70349676206
SN - 9781424437436
T3 - Proceedings of the 2009 ICSE Workshop on Automation of Software Test, AST 2009
SP - 149
EP - 153
BT - Proceedings of the 2009 ICSE Workshop on Automation of Software Test, AST 2009
T2 - 2009 ICSE Workshop on Automation of Software Test, AST 2009
Y2 - 16 May 2009 through 24 May 2009
ER -