期刊文献+

Java类测试工具Junit的分析与扩展 被引量:7

Analysis and extension of java class testing tool junit
下载PDF
导出
摘要 分析了Java类测试工具Junit的功能和结构,并讨论了如何扩展Junit以满足一些Java类特殊要求的测试。Junit主要由3个包(framework、runner、textui)构成。通过对包中主要类的分析,阐述了每个包的作用。并最终以流程图的形式将3个包关联起来,以说明包之间的相互协作及测试在Junit中的执行过程。透过上述分析,可以了解测试在Junit中的执行原理。此外,针对Junit本身的不足和一些特殊的测试需要,总结出对Junit的部分扩展应用,并以实例进行说明。 Function and structure of java class testing tool Junit were analysed and, how to expand Junit to meet some special needs of java class testing is discussed. Junit is mainly made up of three packages (framework, runner, textui). By the mean of analyzing the main class in each package, functions of each package were instructed. Those three packages were connected in the form of flow diagram finally, in order to instruct the cooperation of packages and the process of test execution in Junit. By the mean of analyses above, the principle oftest execution in Junit could be understood. In addition, according to the deficiencies of Junit and some special needs of test, parts of extended applications of Junit are summarized, and instances were introduced to instruct them.
出处 《计算机工程与设计》 CSCD 北大核心 2005年第12期3413-3416,共4页 Computer Engineering and Design
关键词 面向对象 JAVA 测试 JUNIT MOCK OBJECTS object-oriented java test junit mock objects
  • 相关文献

参考文献6

  • 1Gamma Erich,Kent Beck.Junit version3.8.1[CP/OL].http://www.junit.org.
  • 2McGregor JohnD,SykesDavidA.面向对象的软件测试[M].北京:机械工业出版社,2002.50-53.
  • 3Clark Mike.Junit primer[EB/OL].http://www.clarkware.com/articles/JUnitPrimer.html.
  • 4Massol Vincent,Husted Ted.Junit in action[EB/OL].http://www.ebookcn.net.
  • 5Stewart Simon.Approaches to mocking [EB/OL].2004-02-11.http://www.onj ava.com/pub/a/onj ava/mocks.htnl.
  • 6Mackinnon Tim,Freeman Steve,Craig Philip.Endo-testing:Unit testing with mock objects [EB/OL] .http://www.connextra.com/aboutUs/mockobjects.pdf.

同被引文献26

引证文献7

二级引证文献37

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部