没有合适的资源?快使用搜索试试~ 我知道了~
首页使用SWTBOT进行GUI自动化测试
资源详情
资源评论
资源推荐
Milosz Mazurkiewicz
GUI TEST AUTOMATION WITH SWTBOT
Technology and Communication
2010
VAASAN AMMATTIKORKEAKOULU
UNIVERSITY OF APPLIED SCIENCES
Degree Programme of Information Technology
ABSTRACT
Author Milosz Mazurkiewicz
Title GUI Test Automation with SWTBot.
Year 2010
Language English
Pages 50 + 3 Appendices
Name of Supervisor Dr Smail Menani (VAMK), Jakub Drzazga (NSN)
In this thesis the author presents theoretical background of GUI test automation as well
as technologies, tools and methodologies required to fully understand the test program
written in SWTBot. Practical part of the thesis was to implement a program testing File
Menu options of Pegasus RCP application developed in Nokia Siemens Networks.
Concluding this dissertation, in the author’s opinion test programs written using
SWTBot are relatively easy to read and intuitive for people familiar with basic concepts
of Eclipse RCP. Without any doubt SWTBot’s API is large enough to test effectively
such complex application as Pegasus RCP. The biggest problem could be lack of good
documentation and tutorials which makes it difficult to start with. The best and most up
to date is Javadoc that comes with SWTBot’s code. Therefore a developer which wants
to start writing SWTBot tests has to spend some time with it to get familiar with the API
experimenting with the code. Although SWTBot is not a commercial tool, the growing
community of testers and developers using it seems promising considering the need of
support. Despite of what is published on SWTBot’s home page, SWTBot lacks
a recorder which implicates that the tester has to be a programmer. As the analysis has
shown the automated tests execute over twenty times faster comparing with manual
tests.
Pieces of code presented in this document, instructions how to achieve tests
independence, error recovery, and test synchronization, together with big test program
implementation (APPENDIX 2) make up a great tutorial which will help developers
to get familiar with SWTBot’s capabilities. FileMenuTest.java consists of 30 test cases
and has almost 1500 lines of code. The author has made those tests compliant with all
the objectives for well-designed test cases. The program was integrated with the nightly
builds of CruiseControl, which means the author’s work is utilised on a daily basis.
Keywords SWTBot, software testing, GUI testing, test automation
2 (50)
CONTENTS
1 INTRODUCTION ..............................................................................................7
1.1 Rationale and Background of the Project .................................................7
1.2 Aims and Restrictions...............................................................................7
1.3 Materials for Thesis Writing.....................................................................7
2 THEORY OF GUI TEST AUTOMATION .......................................................9
2.1 Introduction and Background ...................................................................9
2.2 Why Do We Need a Methodology for GUI Testing?...............................9
2.3 The Benefits of Test Automation............................................................10
2.4 The Risks of Test Automation................................................................12
2.5 Test Planning and Design .......................................................................14
2.5.1 The Purpose of Test Documentation ...........................................15
2.5.2 Finding Bugs During Test Design Process..................................16
2.6 Well-designed Test Cases.......................................................................17
2.6.1 A Test Case Is Independent.........................................................18
2.6.2 A Test Case Has a Single Purpose...............................................18
2.6.3 Unsuccessful Test Case Should Not Cause Others to Fail..........19
2.6.4 A Test Case Is Well Documented................................................19
2.7 Standardised error recovery....................................................................19
2.8 Testing in Agile Development Environment..........................................20
2.8.1 Agile Methodology......................................................................20
2.8.2 Agile Testing ...............................................................................21
2.9 Best Practices Summarised.....................................................................22
2.9.1 Test Project Planning...................................................................22
2.9.2 Writing the Tests .........................................................................23
3 SWTBOT IN GUI TEST AUTOMATION......................................................25
3.1 Introduction to SWTBot .........................................................................25
3.2 Installation and Configuration of SWTBot.............................................26
3.2.1 Install Eclipse IDE.......................................................................26
3.2.2 Install SWTBot Plug-in ...............................................................26
3.2.3 Create Test Plug-in......................................................................27
3.2.4 Create a Simple Test....................................................................28
3 (50)
3.2.5 Run a Test ................................................................................... 28
3.3 Eclipse RCP............................................................................................ 29
4 DESCRIBING SWTBOT TEST CODE.......................................................... 31
4.1 The Skeleton of the Code ....................................................................... 31
4.2 SWTBot API in Examples ..................................................................... 32
4.2.1 Menu ........................................................................................... 33
4.2.2 Views .......................................................................................... 33
4.2.3 Editors ......................................................................................... 33
4.2.4 Windows ..................................................................................... 34
4.2.5 Tree ............................................................................................. 34
4.2.6 Perspectives................................................................................. 35
4.2.7 Buttons ........................................................................................ 35
4.2.8 Tool Bar Buttons......................................................................... 35
4.2.9 Check Boxes ............................................................................... 35
4.2.10 Text Fields................................................................................... 35
4.2.11 Time and Speed Control.............................................................. 36
4.3 Error Recovery Implementation............................................................. 36
4.3.1 Test without Error Recovery....................................................... 36
4.3.2 Test with Error Recovery............................................................ 37
4.4 Tests Independence Implementation...................................................... 38
4.4.1 Cleanup Method.......................................................................... 39
4.4.2 Test Synchronisation................................................................... 39
5 ANALYSIS ...................................................................................................... 41
5.1 Analysis of Capture/Playback Mechanism............................................. 41
5.1.1 Why Capture/Playback Is a False Economy? ............................. 41
5.1.2 Recorder in SWTBot – a Marketing Stunt.................................. 42
5.2 What Cannot Be Tested with SWTBot .................................................. 42
5.3 Measuring Benefit of Using Automated Tests....................................... 43
6 CONCLUSION ................................................................................................ 47
LITERATURE FOR THESIS WRITING ............................................................ 49
APPENDICES
剩余51页未读,继续阅读
qinjienj
- 粉丝: 89
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1