web ui testing using ruby,watir and cucumber with bdd technique
TRANSCRIPT
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:
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%
The Chinese Whisper Problem:
#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
In BDD one expects the behavior of the software in terms of User stories.l Value prepositionl The Changel The Expected outcome.l
BDD...
Dynamic Understandable syntax OOPs Cross Platform Powerfull libraries Online support community base
Why Ruby...
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
Lets Code......
Ruby ( Install through RVM) $gem install bundler (To manage Dependencies) $gem install watir-webdriver $gem install cucumber $gem install headless
Getting Started.....
Project Structure....
Feature file Example
Steps file
Env.rb file
Gem files....
Code Sample and Execution
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
Rake Plugin- A make-like build utility for Ruby RVM: Manage Multiple version fo Ruby Xvfb plugin: To run the automation headless.
Jenkins Integration
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