摘要
单元测试框架是测试驱动开发模式中的核心工具,当前的研究主要集中在单元测试框架的使用方法,对框架的实现原理研究较少。研究了谷歌公司的开源测试框架GTest的自动调用机制,首先概述了GTest框架的核心技术,然后以自带的Sample1为例,研究了测试用例注册、测试用例执行过程的信息调度,最后研究了GTest的测试执行情况监听机制。
The unit testing framework is the core tool in the test-driven development mode. The current researches focus on the usage of frameworks, but the principles of frameworks are less involved. This paper studies the GTest which is an auto-call mechanism of the open source test framework of the Google Corporation. Firstly, it summarizes core technologies of the GTest. Then, taking the Sample 1 as an example, it studies the information scheduling of the test case registration and the test case execution processes. Finally, it studies the monitoring mechanism of the test execution of the GTest.
作者
刘艳平
费琪
陈伟
LIU Yanping;FEI Qi;CHEN Wei(PLA 91404 Unit,Qinhuangdao 066000;Jiangsu Automation Research Institute,Lianyungang 222061)
出处
《微型电脑应用》
2019年第5期92-94,共3页
Microcomputer Applications