摘要
Easy Mock是一个可以和JUnit很好的集成在一起的Mock框架,它通过构建Mock对象可以减少开发代码与测试代码的耦合,快速有效的完成单元测试、分布式系统测试。在介绍Easy Mock特点、测试框架及其应用的基础上,分析了该框架的优缺点,并针对其缺点提出了相应的解决方案。测试结果表明,注入解决方案后的Easy Mock框架可以降低Mock对象的限制,应用范围更广。
EasyMock is the Mock framework that can integrate with Junit very well. It can reduce the coupling of developing codes and testing codes by constructing the mock object and complete the unit test and the distributed system test rapidly and efficiently. On the basis of introducing the characteristics, the testing framework and the application of EasyMock, the paper makes analysis of its advantages and disadvantages and suggests some corresponding solutionsd. The testing results indicate the framework with the solutions can reduce the constraints of the mock object and can be applied more widely.
出处
《巢湖学院学报》
2014年第6期34-38,共5页
Journal of Chaohu University
基金
巢湖学院教研项目(项目编号:Jyxm201104)
安徽省教育厅基金(项目编号:KJ2010B125)
巢湖学院本科教学质量与教学改革工程资助项目(项目编号:ch13yykc06)