Professional Documents
Culture Documents
BDD QB Modified
BDD QB Modified
Answer
Which of the following is the correct syntax for invoking a
A Watir::Browser.new :firefox Watir::Browser.Launch :firefox
firefox browser?
C Which keyword is used to call a library file in your script? import include
B Which of the following gem is required for accessing an CSV signet csv
file?
A What is the shortut key to open setting in RubyMine IDE? Ctrl+Alt+S Ctrl+Shift+S
cucumber
Which of the following is the correct syntax for reports cucumber features\Opencart.feature --
D generation via command prompt? format html --out TestReport.html features/Opencart.feature --
format html TestReport.html
Cucumber tags are used to sort the Cucumber tags are used to
D Why we use the tags for scenarios in Cucumber ?
scenarios give a scenario a layout
C "____" is the file extension for a ruby file cucumber? .feature .ruby
D BDD stands for? Behave Driven Design Behave Driven Development
B Which testing model is best suited for the BDD framework? Waterfall Agile
D This command is used to check the Ruby version installed. ruby -vi ruby -c
A Which of the following is the correct syntax for invoking a Selenium::WebDriver.for :firefox Selenium::WebDriver.Open :fir
browser using Selenium WebDriver? efox
Which of the following is the correct syntax for declaring an objDriver.driver.manage.timeouts.impli objDriver.driver.manage.timeo
C
implicit timeout using Selenium WebDriver? cit_wait=5 uts.implicit.wait=5
A The command used for enering data in a text field in Ruby .set .type
Cucumber?
Which command is used to check for the presence of an
C object in Ruby Cucumber? .exist .ispresent
B How can we a parameterize any input in the feature file in Write the parameter in single quotes Write the parameter in double
Ruby Cucumber? quotes
Which one of the following is used to select a checkbox in
C Ruby Cucumber? .set .select
B Cucumber is used for "------------" Testing? System & Unit Testing System & Integration Testing
A regular expression is a
A What is a Regular expression? A regular expression is a pattern pattern describing numbers
describing a certain amount of text
only.
B Command used to execute a Cucumber profile? cucumber features -profile cucumber features -p
<profile_name> <profile_name>
D What is cucumber.yml file in Ruby cucumber? It is used to write step definitions It is used to write features
D What is the use of the "super" keyword in Ruby Rails? To call the superclass implementation To call the superclass of the
of the default method default method
$driver.link("http://
D How can we open a Web URL in Ruby Cucumber? $driver.open("http:// 10.207.182.108:81/
10.207.182.108:81/opencart/")
opencart/").click
B How do we do a Dry-run in Ruby Cucumber? Cucumber features –dryrun Cucumber features –dry-run
A Command used for installing a Gem file gem install gemfile gem install gems
foreach("path") do CSV.for("path") do
Which one of the followin is the correct way of reading data |row| |row|
D
from a CSV file? puts row puts row
end end
D "-----" exercise the concept – “ You write test cases and BDD Gherkin
then develop the product that suits them"
C What is the tag used for writing a scenario for Selenium in @Test @Scenario
Ruby Cucumber?
Hello
What is the output of the following code: Hello Hello
10.downto(7) do Hello Hello
A puts "Hello" Hello Hello
end Hello Hello
Hello
Hello
Watir::Browser.Open :firefo
Watir:Browser.new :firefox
x
Gems Lib
objDriver.manage.timeouts.implici objDriver.manage.timeouts.
t_wait=5000 implicit.wait=5
require call
Win32OLE yaml
uuidtools redcard
When Also
support,step_definitions feature,step_definition
| _
& $
Poltergeist Phantom
Ctrl+S Alt+S
Tags Drivers
cucumber features--
cucumber features/@smoke
@smoke
cucumber
cucumber features--
features/Opencart.feature
Opencart.feature --format html --format html --out
TestReport.html
TestReport.html
@ %
support WebDriver
.rb .exe
Behaviour Driven Design Behaviour Driven
Development
Product Backlog BDD
Iterative V model
Concatenation L value
driver.link(:href=>"") driver.link(href=>"")
driver.text(name=>"") driver.text_field(:name="")
objDriver.manage.timeouts.implici objDriver.driver.manage.tim
t_wait=5 eouts.implicit.wait=5000
driver.button(name=>"") driver.webbutton(:name=""
)
driver.radio_button(:name=
driver.radio(:value=>"")
>"")
driver.list(:name=>"") driver.selectlist(:name=>"")
$objBrowser.manage.window.max $objBrowser.driver.manage
imize .window.maximize
CTRL+/ ALT+/
starts_with size
.edit .set_field
.exist? .ispresent?
Refactor---->Rename Refactor--->Edit
F5 Shift+F10
Shift+F10 F9
.click .check
:name=>""&:class=>"" :name=>"",:class=>""
System,Unit &Integration
Unit & Integration Testing Testing
A regular expression is an A regular expression is a
encoding used for describing a pattern used for variable
text names.
Watir Hooks
Pipe(||) And(&&)
Scenario TestCase
RUBYPATH RUBYLIB_PREFIX
:value=> :id=>
$driver.goto("http://
$driver.run("http:// 10.207.182.108:81/
10.207.182.108:81/opencart/")
opencart/")
$objFile=File.Open("Path",'r') $objFile=Open("Path",'r')
|arg| |nextarg|
:xpath=> :XPATH
CSV.foreach("path") CSV.foreach("path") do
|row| |row|
puts row puts row
end end
WATIR Excel
objSheet=objExcel.workbooks("Pa objSheet=objExcel.workboo
th").worksheets("Sheet1") ks.open("Path")
Require_Method() Watir
Acceptance Regression
Gherkin BDD
Iterative BDD
mspec nspec
In Begin In End
middle middle
In END In Begin
@selenium @selenium-cucumber
find xpath
* %
Hello
Error as For/while is not
Hello
implemented
Hello