Keyword Driven Framework using WATIR
-
Upload
nivetha-padmanaban -
Category
Business
-
view
11.586 -
download
4
description
Transcript of Keyword Driven Framework using WATIR
© ThoughtWorks, 2006
Keyword Driven Framework using WATIR
- Nivetha ([email protected])
- Sripad ([email protected])
© ThoughtWorks, 2006
AGENDA
Key Word Driven
FrameworkHow, Why, What
Q & A
© ThoughtWorks, 2006
• Test Automation Framework will reduce the amount of scripting required.
• Test Automation Framework will accommodate changes with minimum effort.
INTRODUCTION
© ThoughtWorks, 2006
About Agile
Changes in requirements are encouraged
Changes in requirements are encouraged
Development will be done in Iterations
Development will be done in Iterations
Follows Test Driven Development
Follows Test Driven Development
Follows Continuous Integration process
Follows Continuous Integration process
© ThoughtWorks, 2006
Types of automation
Record and playback Record and playback
Data DrivenData Driven
Keyword DrivenKeyword Driven
Hybrid Hybrid
© ThoughtWorks, 2006
Keyword Driven Framework
© ThoughtWorks, 2006
Suite
Variables file
.txt
Processing inputs
Core Engine
Library Function
s
Customised Results
Log Files
Architecture
© ThoughtWorks, 2006
Sample Input File aka Test case
.txt
© ThoughtWorks, 2006
Suite
© ThoughtWorks, 2006
Core Engine
© ThoughtWorks, 2006
Processing inputs
© ThoughtWorks, 2006
Library Function
s
© ThoughtWorks, 2006
Customised Results
© ThoughtWorks, 2006
Customised Results
© ThoughtWorks, 2006
Project Specific KeywordsProject Specific Keywords
General KeywordsGeneral Keywords
Data FilesData Files
Object mappingObject mapping
Cost FactorCost Factor
Technical feasibilityTechnical feasibility
ResultsResults
Coding StandardsCoding Standards
Identify Keywords
Develop Core Engine
Structure input files
Choose the tool
Approach
© ThoughtWorks, 2006
WATIR
© ThoughtWorks, 2006
About WATIR
Web Application Testing In Ruby Web Application Testing In Ruby
WATIR development is led by Bret Pettichord and Paul Rogers
WATIR development is led by Bret Pettichord and Paul Rogers
Open-source functional testing tool Open-source functional testing tool
© ThoughtWorks, 2006
About WATIR
WATIR is a Ruby library that works with IE on Windows
WATIR is a Ruby library that works with IE on Windows
Tests can be run in the backgroundTests can be run in the background
Scripting is simple Scripting is simple
© ThoughtWorks, 2006
Advantages
The tester need only learn the "Key Words" required
The tester need only learn the "Key Words" required
The Detail Test Cases can be written in Spreadsheet
format containing all input and verification data
The Detail Test Cases can be written in Spreadsheet
format containing all input and verification data
Easier to write acceptance testsEasier to write acceptance tests
Transfer of knowledge is easier Transfer of knowledge is easier
Easier to report bugs, copy from the input file and paste in Bug Reporting tool
Easier to report bugs, copy from the input file and paste in Bug Reporting tool
Application independent
Application independent
© ThoughtWorks, 2006
Initial time and effort to develop the framework
Initial time and effort to develop the framework
Disadvantages
WATIR does not support plug in applications like Java Applet,
Macromedia Flash.
WATIR does not support plug in applications like Java Applet,
Macromedia Flash.
WATIR works only on IE WATIR works only on IE
Finding reference (name, id, value) to objects (text fields, buttons) may be
tedious
Finding reference (name, id, value) to objects (text fields, buttons) may be
tedious
© ThoughtWorks, 2006
References
WATIR • Tutorial –http://wtr.rubyforge.org/s101/doc/• API Reference –http://wtr.rubyforge.org/rdoc/index.html• Home Page –http://wtr.rubyforge.org• Mailing list – [email protected]
Ruby • Home Page – http://www.ruby-lang.org/en• Discussion Forum -http://rubyforge.org/forum/forum.php?forum_id=958
Tools Supporting WATIR • Recorder - WatirMaker - http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybasedWatir.aspx• Other Tools supporting WATIR - http://wiki.openqa.org/display/WTR/Tools+Supporting+Watir
© ThoughtWorks, 2006
Questions ?