web ui testing using ruby,watir and cucumber with bdd technique

18
Selfie Importance of Requirements. What is BDD RUBY language Introduction to Watir and Cucumber. Project structure. Code sample and Execution. Jenkins Integration. AOB What will be covered:

Upload: arpith-pathange

Post on 11-Apr-2017

160 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Selfie Importance of Requirements. What is BDD RUBY language Introduction to Watir and Cucumber. Project structure. Code sample and Execution. Jenkins Integration. AOB

What will be covered:

Page 2: Web UI testing using Ruby,Watir and Cucumber with BDD technique

The cause of failed projects(case study):

Requirements are Important

Incomplete Requirements 13.1%Lack of user involvement 12.4%Lack of Resources 10.6%Unrealistic expectations 9.9%Lack of executive support 9.3%Changing requirements 8.7%Lack of planning 8.1%System no longer needed 7.5%

Page 3: Web UI testing using Ruby,Watir and Cucumber with BDD technique

The Chinese Whisper Problem:

Page 4: Web UI testing using Ruby,Watir and Cucumber with BDD technique

#BDD in a tweet: Using examples in multilple levels to create a shared understanding and surface uncertainty to deliver a software that matters.

Cont.

Behaviour Driven Development

Page 5: Web UI testing using Ruby,Watir and Cucumber with BDD technique

In BDD one expects the behavior of the software in terms of User stories.l Value prepositionl The Changel The Expected outcome.l

BDD...

Page 6: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Dynamic Understandable syntax OOPs Cross Platform Powerfull libraries Online support community base

Why Ruby...

Page 7: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Free Powerful Simple Excellent support

Free and open source

Ruby library which runs almost all the browsers

Result Oriented. Excellent support

Uses syntax of Gerkhin

Watir

Cucumber

Page 8: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Lets Code......

Page 9: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Ruby ( Install through RVM) $gem install bundler (To manage Dependencies) $gem install watir-webdriver $gem install cucumber $gem install headless

Getting Started.....

Page 10: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Project Structure....

Page 11: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Feature file Example

Page 12: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Steps file

Page 13: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Env.rb file

Page 14: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Gem files....

Page 15: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Code Sample and Execution

Page 16: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Watir-webdriver Support.....

Browsers Supported.l Chromel IEl Safaril FireFoxl Headlessl Mobile Site

Browser elements supportedl Text Fieldsl Select Combosl Radiosl Check Boxesl Buttonsl Linksl Divs and Spans

Waiting Functions..l Wait_Untill When_presentl wait_until_presentl wait_while_present

Page 17: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Rake Plugin- A make-like build utility for Ruby RVM: Manage Multiple version fo Ruby Xvfb plugin: To run the automation headless.

Jenkins Integration

Page 18: Web UI testing using Ruby,Watir and Cucumber with BDD technique

Linksl https://watirwebdriver.com/waiting/l http://hy1984427.github.io/BDD-with-PageObject/StartWithCucumber/

AddingFeatureFileToTestAdditionInCalculator.htmll https://watir.com/examples/l https://github.com/arpithpathange/BingSearch.git