An empirical study of testing file-system-dependent software with mock objects

Madhuri R. Marri, Tao Xie, N. Tillmann, J. D. Halleux, Wolfram Schulte
{"title":"An empirical study of testing file-system-dependent software with mock objects","authors":"Madhuri R. Marri, Tao Xie, N. Tillmann, J. D. Halleux, Wolfram Schulte","doi":"10.1109/IWAST.2009.5069054","DOIUrl":null,"url":null,"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.","PeriodicalId":401585,"journal":{"name":"2009 ICSE Workshop on Automation of Software Test","volume":"26 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-05-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"41","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2009 ICSE Workshop on Automation of Software Test","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/IWAST.2009.5069054","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 41

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
用模拟对象测试依赖文件系统的软件的实证研究
单元测试是一种对程序的单个单元进行隔离测试的技术。当被测单元与其环境相互作用时,被测单元的可测试性会降低。高覆盖率单元测试的构建及其执行需要与环境(如文件系统或数据库)进行适当的交互。为了帮助设置所需的环境,开发人员可以使用mock对象来模拟环境的行为。在本文中,我们提出了一项实证研究来分析使用模拟对象来测试依赖于文件系统的软件。在我们的研究中,我们使用Pex自动测试工具提供的文件系统API的模拟对象。我们分享了在单元测试中使用模拟对象的好处,并讨论了面临的挑战。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Automated testing of a converged conferencing application The compliance testing of software tools with respect to the UML standards specification - The ArgoUML case study An experimental study of methods for executing test suites in memory constrained environments Test generation strategies to measure worst-case execution time Lazy symbolic evaluation and its path constraints solution
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1