文档介绍:中国科学技术大学
硕士学位论文
模型驱动的协议一致性测试系统的研究与实现
姓名:汪志宾
申请学位级别:硕士
专业:计算机软件与理论
指导教师:赵保华
2011-04-21
摘要
摘要
通信技术的发展使得通信网络及其通信协议日趋复杂,网络通信协议变得越
来越复杂,网络协议的复杂性体现在空间分布性、并发性、异步性、不稳定性和
多样性。为了保证网络中各实体间能够正确、可靠地进行通信,根据协议规范对
各个实体进行协议一致性测试,已经成为产品开发过程中的一个重要环节。网络
通信协议的一致性测试,就是检查待测实体的收发行为是否与有关的协议规范相
一致。它主要包括协议形式化描述、测试序列生成、测试脚本生成、测试脚本执
行和结果分析几个基本过程。
本文结合模型驱动的协议测试例自动生成系统项目,首先讨论了一致性测试
概念、一致性测试模型、一致性测试工作流程、一致性测试方法和一致性测试套,
重点研究了基于有限状态机的协议一致性测试序列生成方法,并设计出了一个通
用性、平台无关性、易操作性和可扩展性的测试例自动生成平台。本文的主要内
容如下:
(1)基于 UIO 序列提出了一种新的协议一致性测试生成方法——路径叠加
方法。其核心思想是寻找有限状态机中无重复转换的可行路径作为路径叠加转换
序列,在其后连接该序列尾状态的 UIO 序列,从而验证该序列中所有转换。理
论与实验结果表明,由路径叠加算法生成的测试序列长度要比其他基于 UIO 序
列的算法生成的测试序列明显缩短。特别的,利用路径叠加转换序列来替代对子
序列直接叠加而生成的完全叠加转换序列,在检错性不降低的前提下,大大降低
叠加计算的复杂度。
(2)设计了一个模型驱动的基于 TCL 的协议测试系统的完整体系结构,并
实现了一个完整的测试例自动生成平台。该平台可以完成从协议的形式化描述、
测试序列的生成、测试脚本的生成、测试脚本的执行和测试结果的分析等一系列
完整的测试过程。用所设计的测试系统对 OSPFv3 的接口协议和 Hello 协议实现
了一致性测试,通过测试,证明了测试系统的实用性。
关键词:一致性测试 UIO 序列路径叠加方法有限状态机协议测试系统
2
Abstract
ABSTRACT
With the development munication technologies, works
and protocols e plex. plexity munication protocols
reflects in concurrency, asynchronous, instability and diversity. In order to ensure that
the entities works can accurately and municate with each other,
specification based protocol conformance testing plays an important role in protocol
development cycle. munication protocol conformance testing is focused
on validating whether the implementation under test conforms to the relevant protocol
specifications. It mainly consists of formalization, test sequence generation, test script
generation, test script execution and result analysis.
Combined with the project of protocol conformance test system, the concept of
conformance testing, testing architecture, testing workflow, testing methods and the
framework of test suit are firstly discussed. And then the methods of protocol
conformance test sequence generation based on the finite state machine are fo