基于UML的集成测试用例生成方法的研究与应用-计算机应用技术专业论文.docx
文本预览下载声明
大连理工大学硕士学位论文摘
大连理工大学硕士学位论文
摘 要
软件测试是软件工程的一个重要阶段。随着软件工程的发展,软件设计规模的增大, 软件测试的地位变得日益重要。测试用例的设计和编制是软件测试最重要的活动。测试 用例是测试工作的指导,是软件测试的必须遵守的准则,更是软件测试质量稳定的根本 保障。
目前,测试用例大多是由软件测试人员手动编写。因此,测试用例的质量完全取决 于测试人员的水平。这就很难保证软件测试的质量,进而影响到整个软件产品的质量。 因此,如何自动生成测试用例具有重要的现实意义。国内外,对于自动生成测试用例的 研究主要集中在单元测试用例的生成上。主要以UML中的状态图为测试模型,生成针 对类测试的测试用例。对于集成测试用例生成的研究,主要以UML中的通信图或顺序 图作为测试模型。并且大部分研究处于理论阶段,真正投入使用的工具很少。随着UML 的广泛应用,以UML中的设计模型作为测试的模型,具有重要的现实意义。
本文在总结前人研究的基础上,将UML通信图和状态图结合起来,共同作为生成 测试用例的模型,用于集成测试用例的生成。该方法首先以通信图为依据确定进行集成 测试的对象,然后对集成测试的对象的状态图逐步进行组合,形成既包含状态变化又包 含对象之间交互的组合状态图。重点描述了两个对象或组件的状态图进行组合的方法, 并给出了状态图的形式化描述,以及如何对组合状态图进行展开用于集成测试用例的生 成。
为了检验该方法的实用性,作者实现了利用通信图和状态图共同生成测试用例的工 具。并以实际项目为例,对该方法进行了验证。结果表明,该方法是可行的。该方法将 系统的设计和测试用例的设计统一起来,是对软件测试自动化的一个探索。
关键词:软件测试;集成测试;测试用例;组合状态;通信图;状态图
大连理工大学硕士学位论文Research
大连理工大学硕士学位论文
Research and Application on Qenerating Integration
Test Cases Based on I rⅫ,
Abstract
Software testing is an important part of Software Engineering.With the development of software,software becomes larger and larger.Then,software testing becomes more and more important.Design of test cases is the most important thing in software testing,Test cases are the director and guide lines in testing.What more important,it is a base safeguard of software
quality.
At present,most test cases are written by testers.Therefore,the quality of test cases
completely depends on tester’capacity.On this point,it is difficult to ensure the quality of software testing.Furthermore,it will influence the quality of software product.Therefore,it is significant in application that how to generate test cases automatically.At home and abroad,
research on generating test cases focused Oil test cases for unit testing.Research oil integration testing starts before long.It is mainly based on Communication Diagram or Consequence Diagram.What’s more,most researches are in theory.The developed tools for using are scarcc.With the widely use of UML,it is very significant in application that generate test cases based on UML model
显示全部