基于ATML测试描述文档自动生成测试程序过程中,关键是实现测试资源与测试需求的自动匹配;首先对ATML 测试描述文档中测试能力、测试需求、开关、端口、能力与资源的映射等基本数据元素的表示方法进行分析研究,定义了与其对应的C++数据类型;然后在研究图论相关理论的基础上,分析了描述文档中测试路径的表示方法,确定了采用邻接矩阵表示测试路径的方法;最后,在以上研究的基础上,提出了以稀疏矩阵和单链表为基础的测试能力与测试需求匹配算法,实现了测试能力与测试需求的自动匹配;该算法在实际测试程序开发中得到了应用,结果表明该算法能够实现基于ATML描述文档的测试资源与测试需求自动匹配,并能极大提供测试程序开发效率。
In the process of test program automatic generation based on ATML test description documents,the key is to realize the auto-matic matching of test resources and test requirements.Firstly,the basic data elements,such as ATML test ability,test requirement, switch,port,capability and resource mapping,are analyzed,and the corresponding C++ data types are defined.Then,based on the theory of graph theory,the representation method of the test path is analyzed,and the adjacency matrix is used to represent the test path.Finally, on the basis of above research,a test capabilities and test requirements matching algorithm based on sparse matrix and single linked list is proposed.The automatic matching of test capabilities and test requirements is realized.The algorithm has been applied to the development of real test program.The result shows that the algorithm can realize the automatic matching of test resource and test requirements based on ATML description documents.It also can greatly improve the efficiency of the test program development.