DocumentCode
657523
Title
Directed graph as a model for unit testing
Author
Mukkavilli, Lakshmankumar
Author_Institution
Microsoft, Redmond, WA, USA
fYear
2013
fDate
4-7 Nov. 2013
Firstpage
58
Lastpage
58
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.
Keywords
application program interfaces; directed graphs; formal specification; program testing; program verification; API sequence bugs; API sequence execution; API sequence specification; automatic path generation; code coverage; directed graph; function execution; software bugs; software defects; software development; traversal policies; unit testing; Abstracts; Computer bugs; Electronic mail; Production; Software; Testing; Training; API Sequences; API Testing; Directed Graphs; MBT; Model Based Testing; Unit Testing;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Reliability Engineering Workshops (ISSREW), 2013 IEEE International Symposium on
Conference_Location
Pasadena, CA
Type
conf
DOI
10.1109/ISSREW.2013.6688872
Filename
6688872
Link To Document