web自动化测试工具研究

 2022-09-04 08:09

论文总字数:29146字

摘 要

09013233 汤子凡

指导老师 王世杰

在Web测试领域中,传统的手工测试与Web自动化测试相比,无论从测试的效率还是从异常分支覆盖率的角度来说,展现出的能力就相形见绌了。Web自动化测试以脚本运行自动化、测试用例涵盖广、运行速度高、开发成本低廉等优点,已在业界逐渐流行起来。

本论文首先介绍了Web自动化的背景,讨论了什么样的项目适合Web自动化并简单介绍Web自动化在现如今业界的知名框架。而后着重介绍了Selenium家族的几款开源框架的优缺点。之后详细介绍了轻重两种不同量级的测试框架Selenium IDE和 Selenium Webdriver。文中详细介绍了Selenium IDE的使用,并以简单的网页搜索为例使用Selenium IDE录制脚本。针对Selenium IDE的不足,以Canvas作为测试关注点,阐述了Selenium Webdriver与Selenium IDE相比的技术优势。论文着重剖析了Selenium Webdriver内部实现原理并进行源码分析。后文中介绍了Selenium Webdriver的使用特色。最后对Web项目进行部署测试,测试结果证明自动化测试具有高可靠性和高效性。

关键词:Web自动化测试技术,Selenium IDE,Selenium Webdriver,Canvas

WEB Automated Testing

ABSTRACT

09013233 Tang Zifan

Advisor Wang Shijie

The trend of replacing simple Manual labor by mechanical production becomes more obvious. In the field of Web testing, compared with Web automated testing, the ability of the traditional manual testing, in terms of the efficiency of the test or the coverage of abnormal branch, show dwarfs. Considering automation of running the script, the wide coverage of test cases, high speed, and low development costs, etc., Web automated testing has been gradually popular in the industry.

This paper first introduces the background of Web automation, discusses what kind of project is suitable for Web automation and briefly introduces the well-known framework of Web automation in today's industry. And then we focus on advantages and disadvantages of the several Selenium family’s open source framework. The lightweight Selenium IDE and heavyweight Selenium Webdriver are described in detail. The paper introduces the use of the Selenium IDE and uses the simple web search as an example to use the Selenium IDE to record scripts. In view of the shortcomings of Selenium IDE, focused on Canvas, the paper elaborates which advantages of Selenium Webdriver weighs over Selenium IDE. The paper focuses on the internal realization of Selenium Webdriver and analyzes the source code. Later,it introduced Selenium Webdriver's features. Finally, we deploy the web project and test the performance of the test script. The test results ensure that the automation test is highly reliable and efficient.

KEY WORDS: Web automation testing, Selenium IDE, Selenium Webdriver, Canvas

目录

第一章 绪论 1

1.1 研究背景 1

1.2 研究现状 2

1.2.1 WEB自动化测试应用范围 2

1.2.2 自动化测试框架 3

1.3 研究目标和内容 5

1.4 论文组织结构 5

第二章 相关技术 6

2.1 Selenium IDE 6

2.2 Selenium RC 7

2.3 Selenium Webdriver 7

2.4 Selenium Grid 8

第三章 Selenium IDE 10

3.1 Selenium IDE的使用方法 10

3.2 Selenium IDE示例 13

3.3 本章小结 15

第四章 Selenium Webdriver 16

4.1 Webdriver源码分析 16

4.2 Webdriver使用方法 18

4.2.1 Webdriver安装部署 18

4.2.2 Webdriver浏览器兼容性 18

4.2.3 Webdriver页面交互 18

4.3 本章小结 19

第五章 系统测试与结果分析 20

5.1 实验环境部署 20

5.2 待测项目分析 20

5.3 测试用例的构建 26

5.4 系统测试过程 26

5.5 数据分析 28

第六章 总结与展望 30

6.1 论文总结 30

6.2 工作展望 30

致谢 32

参考文献 33

第一章 绪论

1.1 研究背景

随着计算机产业的发展日新月异,软件产品的质量越来越受到关注,一款好的产品不仅需要有实用的功能,而且还需要有稳定的运行状态。这就需要开发团队强大的专业技能,不仅设计出优秀的业务功能,还要在测试方面给予足够的重视。需要测试与开发同步,不断跟进项目开发需求,不断地进行调整。

  顺应软件开发的需求,软件的开发体系逐渐完善,软件开发过程中可采用的技术和工具越来越丰富,软件工程的思想逐渐投入实践生产中。在一套完整的软件工程思想中,建立一套完整的测试体系是必不可少的。这样的体系要求涵盖面足够广,CMM、测试理论、自动化测试工具等方方面面都应该再考虑的范围内。然而如此多的测试方面最值得探讨的部分就是持续集成与测试自动化。业内已经有很多关于持续集成和自动化测试方面的介绍,简单的持续集成是为了配合敏捷开发的速度和效率而产生的一个用于编译、测试、发布、部署的工具。在开发过程中,代码的质量是需要持续的、及时的进行跟踪的,对软件质量的监控和全面的反馈是对敏捷开发的测试关键所在。往往在每次的敏捷开发中,软件开发人员都需要不断地增加功能、修复缺陷或重构代码,这样的过程持续一整个迭代过程,所以开发者在开发完新需求,增添了新功能后,首先应考虑的就是保证原有功能的可用性和无差错性,就需要通过软件的回归测试来保证功能正常可用。

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

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

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