Directed graph as a model for unit testing

Lakshmankumar Mukkavilli
{"title":"Directed graph as a model for unit testing","authors":"Lakshmankumar Mukkavilli","doi":"10.1109/ISSREW.2013.6688872","DOIUrl":null,"url":null,"abstract":"Unit testing is recognized as an important part of software development. There are several frameworks to facilitate unit testing. All these frameworks provide support for executing various functions in the unit under test. Our analysis of customer found defects indicated that most of the unit test escapes were a result of execution of sequences of API's. None of the frameworks we looked provided explicit support for execution of API sequences. We designed and implemented a unit testing framework where we provided direct support for specification of API sequences. Each unit test is specified as a directed graph. Each edge corresponds to execution of an API and nodes are used for validation. The framework generates various paths through the graph. Various traversal policies like random, all nodes/edges, every adjacent edge pair etc. are supported. We rewrote unit tests for four features using the new framework. Each unit under test is about 2000 lines of code. Directed graph model helped uncover about 6 new bugs/feature. Automatic path generation has helped explore various API sequences that are very difficult to test manually. Code coverage increased on the average by about 6%. The framework is in production use and is able to uncover various API sequence bugs that are not easily uncovered by traditional unit testing tools. After initial training, engineers are eager to model their tests as directed graphs.","PeriodicalId":332420,"journal":{"name":"2013 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-12-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSREW.2013.6688872","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Unit testing is recognized as an important part of software development. There are several frameworks to facilitate unit testing. All these frameworks provide support for executing various functions in the unit under test. Our analysis of customer found defects indicated that most of the unit test escapes were a result of execution of sequences of API's. None of the frameworks we looked provided explicit support for execution of API sequences. We designed and implemented a unit testing framework where we provided direct support for specification of API sequences. Each unit test is specified as a directed graph. Each edge corresponds to execution of an API and nodes are used for validation. The framework generates various paths through the graph. Various traversal policies like random, all nodes/edges, every adjacent edge pair etc. are supported. We rewrote unit tests for four features using the new framework. Each unit under test is about 2000 lines of code. Directed graph model helped uncover about 6 new bugs/feature. Automatic path generation has helped explore various API sequences that are very difficult to test manually. Code coverage increased on the average by about 6%. The framework is in production use and is able to uncover various API sequence bugs that are not easily uncovered by traditional unit testing tools. After initial training, engineers are eager to model their tests as directed graphs.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
有向图作为单元测试的模型
单元测试被认为是软件开发的重要组成部分。有几个框架可以促进单元测试。所有这些框架都为在测试单元中执行各种功能提供了支持。我们对客户发现的缺陷的分析表明,大多数单元测试逃码是执行API序列的结果。我们所看到的框架都没有为API序列的执行提供明确的支持。我们设计并实现了一个单元测试框架,在这个框架中我们为API序列的规范提供了直接的支持。每个单元测试被指定为一个有向图。每条边对应一个API的执行,节点用于验证。框架通过图生成各种路径。支持各种遍历策略,如随机,所有节点/边,每个相邻边对等。我们使用新框架为四个特性重写了单元测试。被测试的每个单元大约有2000行代码。有向图模型帮助发现了大约6个新的bug /特性。自动路径生成有助于探索各种难以手动测试的API序列。代码覆盖率平均增加了约6%。该框架已投入生产使用,能够发现传统单元测试工具难以发现的各种API序列错误。在最初的培训之后,工程师们渴望将他们的测试建模为有向图。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Bug localisation through diverse sources of information A chain of accountabilities in open systems based on assured entrustments Estimating response time distribution of server application in software aging phenomenon Safety assessment of software-intensive medical devices: Introducing a safety quality model approach Detection of missing requirements using base requirements pairs
×
引用
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