摘要
随着现代信息技术的飞速发展,计算机的应用已经渗透到了人类生活的各个领域,软件在金融、交通、通讯、航天等关键领域日益广泛,软件测试在软件开发过程中也变得越来越重要,为了降低软件测试成本、适应开发技术的发展以及效率的需要,自动化测试逐渐成为测试的发展方向。在很多软件测试项目中,我们希望能够摆脱手工测试,而更多的采用自动化程序和可持续集成的工具和平台进行测试,从而提高软件测试的效率和可靠性。
目前的持续集成技术源于敏捷编程(XP),它已广泛的应用于很多项目中,比传统的开发模式有着更多的优点,它能持续有效的对项目进行集成测试,从而发现和修复更多的bug,提高开发的效率,并减少产品质量风险。持续集成近年来得到了广泛的研究:持续集成常用的支撑工具,自动化测试和持续集成的关系,持续集成在中小项目中的应用,日构建和持续集成的区别。但是还有一些大型项目完成一次完整的集成测试需要耗费很长时间,这是普通持续集成方案无法满足的。论文主要研究流程引擎服务平台的测试方案。包括测试前期的数据准备(针对不同的需求设计流程图,及各个接口的接口文档),编写JUnit 测试用例,Hudson持续集成技术的改进和测试覆盖率工具TCC部署、使用及结果分析等。
关键词:持续集成;自动化测试;测试覆盖率;流程设计
Abstract
With the rapid development of modern information technology, computer application has been penetrated every field of human life, software in finance, transportation, telecommunications, aerospace, and other key areas extensively, software testing is also becoming more important in the software development process. In order to reduce software testing cost, to adapt to the development of the technology development and efficiency of the need, the test automation gradually becomes test development direction. Many software testing project, we hope to be able to get rid of manual testing, and more using automated programs and sustainable integration tools and platforms, so as to improve test efficiency and reliability of software test.
The current continuous integration technology from agility programming (XP), it has been widely used in many projects than traditional development mode, has more advantages, it can continue to integrate effectively project, thus find and repair test more bug, increase development efficiency and reduce product quality risk. Continuous integration in recent years obtained the extensive research: continuous integration common support tools, the test automation and continuous integration relationship, continuous integration in small and medium-sized project application, the difference between construct and continuous integration. But there are some large project to complete a full integration tests need to take a long time, this is common continuous integration scheme can't satisfy.
This paper focuses on the test scheme of process engine service platform. Including the test data which is prepared by different requirements (each interface design flow chart, and the interface file), write JUnit test cases, Hudson continuous integration technology improvement and the test coverage TCC deployment, analysis the result, etc.
Keywords:Continuous integration; Test automation; The test coverage; Process design
目录
摘要....................................................................... II 目录..................................................................... III 第1章绪论. (1)
1.1 研究背景及选题意义 (1)
1.2 研究现状 (1)
1.3 主要工作 (3)
1.4 论文结构 (5)
第2章软件测试理论 (6)
2.1 软件测试相关定义 (6)
2.1.1 软件测试的概念 (6)
2.1.2 软件测试的目的 (6)
2.1.3 软件测试的原则 (7)
2.1.4 软件测试流程 (7)
2.2 软件测试策略 (8)
2.2.1 单元测试 (8)
2.2.2 集成测试 (9)
2.2.3 系统测试 (10)
2.2.4 性能测试 (10)
2.2.5 验收测试 (11)
2.2.6 回归测试 (11)
2.3 软件自动化测试技术 (11)
2.3.1 自动化技术概述 (12)
2.3.2 自动化技术的流程 (12)
2.3.3 自动化技术的周期 (13)
2.3.4 自动化技术的优缺点 (14)
第3章TConsole流程设计器方案 (16)
3.1 工作流技术概述 (16)
3.1.1 工作流引擎简介 (16)
3.1.2 JBPM基本知识 (16)
3.2 TConsole流程设计器介绍 (18)
3.2.1 基本概念 (18)
3.2.2 工具栏功能说明 (19)
3.2.3 组件栏各结点介绍 (20)
3.3 TConsole对PMC项目的解决方案 (22)
3.3.1 组件栏Global、Decision、Task结点 (22)
3.3.2 “请假流程的设计” (23)
第4章PMC的JUnit测试方案 (25)持续集成的概念
4.1 自动化测试设计 (25)
4.1.1 JUnit框架分析 (25)
4.1.2 使用Subversion进行版本控制 (26)
4.1.3 使用maven自动化的构建测试 (27)
4.1.4 自动化测试过程 (28)
4.2 PMC的Junit测试方案 (28)
第5章Hudson持续集成技术 (31)
5.1 持续集成基本理论 (31)
5.1.1 持续集成的概念 (31)
5.1.2 持续集成的优点 (32)
5.1.3 持续集成的部署 (32)
5.1.4 持续集成的自动化过程 (33)
5.1.5 持续集成CI服务器 (34)
5.2 Hudson持续集成技术 (35)
5.2.1 Hudson介绍 (35)
5.2.2 配置与使用 (35)
5.2.3 CI服务器对比 (36)
5.3 Hudson持续集成技术的改进 (38)
第6章测试覆盖率工具TCC的研究 (40)
6.1 测试覆盖率基本理论 (40)
6.1.1 测试覆盖率概念 (41)
6.1.2 测试覆盖率类型 (41)
6.1.3 衡量测试覆盖面 (43)
6.1.4 测试覆盖工具介绍 (44)
6.2 TCC介绍 (46)
6.2.1 基本概念 (46)
6.2.2 特性 (48)
6.2.3 何时开始分析代码覆盖率 (49)
6.2.4 TCC工作原理 (49)
6.3 测试结果与分析 (50)
6.3.1 未覆盖的原因分析 (50)
6.3.2 解决方案 (51)
第7章结语 (53)
7.1 结论 (53)
7.2 展望 (53)
参考文献 (55)
致谢 (57)