22
© ThoughtWorks, 2006 Keyword Driven Framework using WATIR - Nivetha ([email protected]) - Sripad ([email protected])

Keyword Driven Framework using WATIR

Embed Size (px)

DESCRIPTION

Presented in Stepin conference, Bangalore.

Citation preview

Page 1: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Keyword Driven Framework using WATIR

- Nivetha ([email protected])

- Sripad ([email protected])

Page 2: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

AGENDA

Key Word Driven

FrameworkHow, Why, What

Q & A

Page 3: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

• Test Automation Framework will reduce the amount of scripting required.

• Test Automation Framework will accommodate changes with minimum effort.

INTRODUCTION

Page 4: Keyword Driven Framework using WATIR

© 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

Page 5: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Types of automation

Record and playback Record and playback

Data DrivenData Driven

Keyword DrivenKeyword Driven

Hybrid Hybrid

Page 6: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Keyword Driven Framework

Page 7: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Suite

Variables file

.txt

Processing inputs

Core Engine

Library Function

s

Customised Results

Log Files

Architecture

Page 8: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Sample Input File aka Test case

.txt

Page 9: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Suite

Page 10: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Core Engine

Page 11: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Processing inputs

Page 12: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Library Function

s

Page 13: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Customised Results

Page 14: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Customised Results

Page 15: Keyword Driven Framework using WATIR

© 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

Page 16: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

WATIR

Page 17: Keyword Driven Framework using 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

Page 18: Keyword Driven Framework using WATIR

© 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

Page 19: Keyword Driven Framework using WATIR

© 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

Page 20: Keyword Driven Framework using WATIR

© 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

Page 21: Keyword Driven Framework using WATIR

© 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

Page 22: Keyword Driven Framework using WATIR

© ThoughtWorks, 2006

Questions ?