期刊名称:International Journal of New Computer Architectures and their Applications
印刷版ISSN:2220-9085
出版年度:2011
卷号:1
期号:4
页码:926-941
出版社:Society of Digital Information and Wireless Communications
摘要:Unit testing is a method for quickly assessing the building blocks of a program and for obtaining accurate error localizations. However, in order to achieve these qualities, the tests cases need to be isolated, since an external call may imply a connection to a remote database. This requirement also makes unit testing difficult to initiate for classes with outside dependencies, and consequently several approaches have been devised to facilitate unit testing of these methods. This paper focuses on the different ways of unit testing Java methods with external dependencies in an Android application. Additionally, it covers a new category of testing methodology called shadow objects. First, the study examines some of the current methods of testing. Then, it details the different ways a class with an external dependency could be unit tested. Finally, the paper presents a discussion and evaluation of the study.