资金存管系统的自动化测试工具设计与实现

 2022-04-07 08:04

论文总字数:23176字

摘 要

现如今,随着社会的不断进步和科学技术的快速发展,软件技术及产品被应用到社会的各个领域。由于计算机软件的广泛应用以及全球日益激烈的软件技术竞争,使得人们对软件系统的质量要求越来越严格,软件缺陷不仅可能会带来巨大的财产经济损失,也可能危害民众生命安全,因此软件测试变得异常重要。软件工程从诞生到消亡的各个阶段,软件测试都参与其中,为软件的质量和安全做出了重要保障。但是软件的规模并不是一成不变的,随着需求的迭代,它的复杂性和规模性会不断扩大。传统的手工测试成本高、效率低、发现缺陷晚等缺点已经不能完全满足软件开发的需求。为了解决这个问题,自动化测试成为当前测试领域发展的趋势。因此,软件自动化测试技术的研究和实践具有非常重要的意义。

本文首先介绍并且比较了当前流行的几种自动化测试框架和方法,作为本文研究的基础。然后设计并实现了一套基于Robot Framework框架的自动化测试方案,应用于资金存管系统的回归测试。该方案充分利用了关键字驱动的优势并结合了“层次化关键字”的测试脚本设计思想,提高了测试脚本的可维护性和复用性。

基于Robot Framework框架的自动化测试解决方案应用于资金存管系统的回归测试中,通过对其手工测试用例覆盖率、执行效率等指标做出统计,证明该系统有良好的性能。并且该系统实现了测试数据、测试逻辑和测试脚本三者的分离,降低了脚本层之间的耦合性。在保证了软件质量的同时,也提高了测试效率,充分体现了自动化测试的优势。

关键词:自动化测试,Robot Framework,层次化关键字,测试脚本

ABSTRACT

Nowadays, with the continuous advancement of society and the rapid development of science and technology, software technology and products are applied to various fields of society. Due to the widespread use of computer software and the increasingly fierce competition in software technology around the world, the quality requirements of software systems are becoming more and more strict. Software defects may not only bring huge economic and economic losses, but also may endanger people's lives. Therefore, software testing becomes extremely important. Software testing runs through the entire lifecycle of software engineering, providing an important guarantee for the quality and security of software. But the scale of the software is not static. As the demand iterates, its complexity and scale will continue to expand. The shortcomings of traditional manual testing, such as high cost, low efficiency, and late detection of defects, can no longer fully meet the needs of software development. In order to solve this problem, automated testing has become a trend in the current testing field. Therefore, the research and practice of software automated testing technology is very important.

This paper first introduces and compares several popular automated testing frameworks and methods as the basis of this study. Then, an automated test system based on the Robot Framework was designed and implemented, which was applied to the regression test of the company's fund depository system. The system makes full use of the advantages of keyword-driven and combines the test script design idea of “hierarchical keywords” to improve the maintainability and reusability of test scripts.

The automated test solution based on the Robot Framework is applied to the regression test of the fund depository system. The statistics of the manual test case coverage and execution efficiency are used to prove that the system has good performance. And the system realizes the separation of test data, test logic and test script, which reduces the coupling between script layers. While ensuring the quality of the software, it also improves the test efficiency and fully demonstrates the advantages of automated testing.

KEY WORDS: automated test, Robot Framework, Hierarchical Keywords, Testing Script

目 录

摘 要 I

ABSTRACT II

第一章 绪论 1

1.1课题的背景和意义 1

1.2国内外研究现状 2

1.3研究目标与内容 3

1.4论文组织结构 3

第二章 测试知识和被测系统介绍 5

2.1软件测试概念 5

2.2软件自动化测试基础 5

2.2.1自动化测试概念 5

2.2.2自动化测试的优缺点 5

2.3自动化测试框架 6

2.3.1录制/回放测试框架 6

2.3.2数据驱动测试框架 6

2.3.3关键字驱动测试框架 7

2.4自动化测试工具 8

2.4.1自动化测试工具介绍和比较 8

2.4.2 Robot Framework框架简介 9

第三章 需求分析与系统概要设计 10

3.1自动化测试系统需求分析 10

3.2自动化测试系统概要设计 11

第四章 自动化测试系统详细设计与实现 12

4.1自动化测试目录结构 12

4.2关键字库的设计与实现 12

4.2.1层次化关键字设计 12

4.2.2层次化关键字的实现 15

4.3测试用例组织与实现 17

4.3.1测试用例的组织结构 17

4.3.2测试用例的实现 18

4.4测试数据文件的设计与实现 19

第五章 自动化测试系统的部署与评估 20

5.1自动化测试系统的部署 20

5.2自动化测试系统的评估 20

5.2.1手工测试用例覆盖率评估 21

5.2.2系统执行效率评估 22

第六章 工作总结及展望 23

6.1论文总结 23

6.2未来工作展望 23

致 谢 24

参考文献 25

第一章 绪论

1.1课题的背景和意义

在信息时代不仅诞生了全新的行业,很多传统行业比如制造、买卖都开始依托互联网技术向网络行业转轨。与此同时,人们也对软件产业有了更高的要求。软件缺陷(常被称为“Bug”)致使软件在某一特定条件下出现故障[1],导致用户的需求在某种程度上无法得到满足。有的软件缺陷会产生微不足道的影响,有的却可能会造成重大经济损失和生命危险。2002年,美国国家标准与技术研究所的一项研究表明,软件缺陷每年给美国造成的损失高达595亿美元,其中超过1/3的损失,只要稍加测试即可避免。人需要参与软件开发的各个阶段,而人难免有疏漏,并且随着需求的迭代更新,软件趋向大型化和高复杂化,缺陷更有可能产生。软件测试深入软件开发过程的每个阶段,在有限的开发条件下,最大程度的保证最终的软件产品符合用户需要。

日益激烈的软件产品竞争使得软件开发周期缩短,留给测试的时间也越来越少,单纯的手工测试已经无法满足需求。手工测试具有以下缺点:第一、需要耗费大量的人力和精力。一个系统可能会有几百个用例,并且有新需求增加的时候,不仅要构建新用例测试新功能,还要重新测试之前的功能,以保证增强型或改正型的修改使软件可以正常运行,不影响已有功能。这无疑非常繁琐耗时;第二、人工执行难免会有疏漏,可能会因为各种其他因素造成测试出错;第三、不方便生成测试报告,难以直观看到测试结果,包括测试时间以及缺陷集群处等;第四、系统测试和性能测试例如评价系统响应时间、吞吐率、负载等,难以通过手工测试完成,必须借助自动化测试工具。

剩余内容已隐藏,请支付后下载全文,论文总字数:23176字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;