围绕TestRail平台的自动化工具集开发

 2022-06-25 10:06

论文总字数:30226字

摘 要

本文主要围绕TestRail测试用例管理平台来开发一系列的自动化工具来解放开发人员或测试人员的生产力,并且对TestRail平台本身增加监控功能以及针对其性能缺陷进行优化与扩展,从而满足企业特定需求。·

工具集主要包括三个部分,迁移工具、自动化测试工具、系统监控工具,它们通过Restful风格的API来获取或修改TestRail的内容,第一个是将测试用例,测试结果等数据从旧的Silk Central平台上迁移到新的测试管理平台TestRail中的迁移工具,以及从单个项目组自身的TestRail平台向全体TestRail平台的数据迁移工具;第二个就是通过UI脚本在TestRail中嵌入的自动化测试用例的执行工具Agent的设计与开发,其主要功能包括执行测试用例脚本,分析脚本执行结果,执行结果回传以及测试完成通知等功能,从而可以保证一次点击执行整个测试集合,并将测试结果自动回传到TestRail中,同时为之后持续集成/持续部署的自动化做铺垫,同时也需要测试用例导出工具Export-Tool的辅助,将TestRail平台中的自动化测试用例按照特定格式导出;第三个是围绕TestRail本身,对用户,项目实行系统级监控,并通过定时器定时生成监控报告。

通过围绕TestRail开发的一系列自动化工具,实现从迁移到执行测试再到生成结果报告的自动化以提高工作效率,并与持续集成/持续部署工具相结合,使软件开发整个生命周期自动化。

关键词:自动化,数据迁移,自动化测试,测试管理,系统监控。

Abstract

The paper is a summary of the practice about automation tools based on the test case management platform TestRail. It aims to emancipate the productive forces of developer and tester through developing a series of automation tools and adding system monitor plugins. Otherwise, it includes some practice to improve the performance of TestRail in specific conditions.

The tools set includes three parts: Migration Tool, Automated Testing Tool, System Monitor Tool. They are associated with TestRail by restful API to get or update the content of TestRail, and there are three tools in the tools set. First of all, the migration tool which migrate test data and result from old system Silk Central to new system TestRail. In other case, some product team has their own TestRail system, so we have to add another migration tool which migrates data from TestRail to TestRail when they would like to use the official TestRail; Another tool is related to automated testing tool called agent, we design and develop it and embed it in TestRail page through UI script which is supported by TestRail. The function of the tool includes the executing of test case scripts, analysis of test results, returning the result to TestRail and notification to the user who use the tool to execute scripts so that the user can execute a suite which contains hundreds of cases and by one click, and get the result of those cases to reduce the workload of users. Apart from agent, there have to be a tool which export test case scripts following a certain format from TestRail. Last, we add system-level monitor to users and projects in TestRail, and generate report regularly by some timers.

Developing a series automated tools based on TestRail achieve automated migration, execution of test case scripts, and generating reports to improve work efficiency and quality. Combined with continuous integration/continuous deployment so that make the whole software lifecycle automated.

KEY WORDS: Automation, Data Migration, Automated Testing, Test Management, System Monitor

目录

摘要 I

Abstract II

第一章 绪论 3

1.1 选题背景及意义 3

1.2 相关平台及概念 2

1.2.1 软件测试 2

1.2.2 Silk Central与TestRail 2

1.2.3 自动化 4

第二章 理论研究 5

2.1 数据迁移 5

2.1.1 同构数据迁移 5

2.1.2 异构数据迁移 5

2.2 自动化测试 6

2.3 系统监控工具 6

第三章 需求分析 7

3.1 迁移工具 7

3.2 自动化测试工具 8

3.3 系统监控工具 9

第四章 系统设计与实现 10

4.1 整体架构 10

4.2 迁移工具 11

4.2.1 数据 11

4.2.2 任务调度 14

4.2.3 可配置化 14

4.2.4 性能调优 16

4.3 自动化测试工具 17

4.3.1 架构设计 17

4.3.2 UI与命令行 18

4.4 系统监控工具 19

第五章 测试结果 21

5.1 整体结果 21

5.2 迁移工具 21

5.3 自动化测试工具 23

5.4 关于系统监控工具 23

第六章 总结与展望 25

6.1 总结 25

6.2 展望 25

致谢 27

参考文献 28

绪论

选题背景及意义

在敏捷开发的概念提出后,随着各种各样的实践经验,证明了其优越性。敏捷开发最重要的特性就体现在“敏捷”二字,即它能够按照需求及时对软件产品进行修改[10],这是随着软件规模如滚雪球般越来越大的现象而采取的针对性的改进,同时,采用敏捷开发能够尽快地做出可运行的产品,从而快速占据市场,这无疑是符合公司利益的。因此,企业也在软件开发模型上进行转变以及创新,而这种转变不仅仅是开发者日常开发习惯的,更需要一系列的辅助工具来帮助管理者以及开发者来更加快速的适应敏捷开发模型,同时提供一些在开发或交流上的便利条件。

而在软件开发周期中,软件测试作为最终交付产品的质量保证[6],可以说是不可或缺的一部分。而在一个大型项目中,从开发时的单元测试到模块集成时的集成测试到项目部署时的部署测试,测试人员设计的测试用例数量庞大,因此对于测试用例的管理也需要消耗开发或测试人员的大量精力。因此,一个好的测试用例管理平台可以将管理工作交给平台,并且平台提供一个合理的测试用例组织结构,从而使测试人员只集中在测试用例的设计,从而解放其生产力,提高其工作效率。另一方面,在敏捷开发过程中,每一次迭代后,上一次迭代的部分测试用例仍需要重新执行,从而保证此次迭代对之前的软件产品模块没有产生消极影响,而这也就表明每次迭代后,会有部分相同测试用例需要执行,因此这就需要测试管理平台同时具有选定部分测试用例作为测试集的功能。还有一方面,就是测试用例的执行问题,由于测试用例数量庞大,每次测试所消耗的时间也是很巨大的,因此产品组会将其测试用例自动化,这也就同时要求测试管理平台有着将自动化测试用例集中执行的功能。综上,一个测试管理平台,需要同时具有以下基本功能: 具有良好的测试用例管理结构;选定部分测试用例作为测试集;支持自动化测试。另外还有诸如成员工作量评估,统计测试时间,生成相关报表等功能。

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

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

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