Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 8

Question Option 1

Which of the following is the correct syntax for invoking a Watir::Browser.new :firefox
firefox browser?

What are the library files in Ruby/Cucumber called? Utils

What is the language used for expressing scenario in feature Gherkin Language
file?
Which of the following is the correct syntax for objDriver.driver.manage.timeouts.impli
implementing a implicit wait of 5 seconds? cit_wait=5

Which keyword is used to call a library file in your script? require

Which of the following gem is required for accessing an Excel Win32OLE


file?
Which of the following gem is required for accessing an CSV
file? csv

Which of the following is not a keyword in Cucumber? Also

What are the 2 files required to execute a Cucumber test features,step_definiton


scenario?
Which symbol is used to separate columns in Scenario
|
Outline?
Which symbol is used as preffix to declare a variable as
$
public?

Which of the following is NOT a webDriver in Cucumber? Phantom

What is the shortut key to open setting in RubyMine IDE? Ctrl+Alt+S

What are before, after, beforeStep and afterStep in


Hooks
Cucumber?

Which of the following is the correct syntax for command


line execution of a feature file named 'MyScript' assuming cucumber features/MyScript.feature
we are at the project folder in Command Prompt?

Which of the following is the correct syntax for command


line execution of a feature file named 'MyScript' which has a cucumber features --tags @smoke
tag named '@smoke' assuming we are at the project folder
in Command Prompt?

Which of the following is the correct syntax for reports cucumber features/Opencart.feature --
generation via command prompt? format html --out TestReport.html

Cucumber tags are used to filter the


Why we use the tags for scenarios in Cucumber ? scenarios and execute the scenarios
based on tags.

What preffix is used for adding a tag to a scenario? @


What is the syntax of executing all the feature files in a cucumber features
project from command line?
Where does the Cucumber execution starts from? support

It is used to load the required libraries


What is env.rb used for? for cucumber scenario execution

"____" is the file extension for a ruby file cucumber? .rb

BDD stands for? Behaviour Driven Development


Which of the following is not a Agile methodology? BDD
Which testing model is best suited for the BDD framework? Agile

What is the default feature for parameterizing your scenario Scenario Outline
in Ruby?

"--------------" is the method available in Ruby Cucumber to Interpolation


use the value of a variable inside a string?

This command is used to check the Ruby version installed. ruby -v

How do we identify a link in Ruby Cucmber? driver.link(:href=>"")

How do we identify a Textbox in Ruby Cucmber? driver.text_field(:name=>"")


Which of the following is the correct syntax for invoking a Selenium::WebDriver.for :firefox
browser using Selenium WebDriver?

Which of the following is the correct syntax for declaring an objDriver.manage.timeouts.implicit_wa


implicit timeout using Selenium WebDriver? it=5

How do we identify a WebElement(Button) in Ruby


driver.button(:name=>"")
Cucumber?

How do we identify a RadioButton in Ruby Cucmber? driver.radio(:value=>"")

How do we identify a ComboBox in Ruby Cucmber? driver.select_list(:name=>"")

How do we maximize a browser window in Ruby Cucumber? $objBrowser.driver.manage.window.m


aximize
Which file cannot be used to import data into Ruby
JS file
Cucumber?
How do we define functions in Ruby Cucumber? def  <function_name>

How do we comment a block of code in Ruby Cucumber? CTRL+/

Which one of the following is not a valid String command in


Ruby Cucumber? equal

The command used for enering data in a text field in Ruby .set
Cucumber?
Which command is used to check for the presence of an
.exist?
object in Ruby Cucumber?

How do we "Rename" a file in Ruby Cucumber? Refactor---->Rename

Shortcut for Running a Scenario in Ruby Cucumber? Shift+F10

Shortcut for Debugging a Scenario in Ruby Cucumber? Shift+F9

How can we a parameterize any input in the feature file in Write the parameter in double quotes
Ruby Cucumber?
Which one of the following is used to select a checkbox in
.click
Ruby Cucumber?
How do we give multiple properties for an Object in Ruby
Cucumber? :name=>"",:class=>""

Which of the following is not part of a "feature" file in Ruby


Step_definition
Cucumber?
Cucumber is used for "------------" Testing? System & Integration Testing

What is a Regular expression? A regular expression is a pattern


describing a certain amount of text

Which of these we do NOT need to run a Cucumber Web Hooks


Test?

What does a features/support file contain? Features/ support file contains


supporting ruby code
How is the data seperated in a Scenario Outline in Ruby Pipe(||)
Cucumber?

What is missing in the following code of Ruby Cucumber:


Feature: Visit XYZ page in abc.com
Given: I am on abc.com Scenario
When: I click on XYZ page
Then: I should see ABC page

Command used to execute a Cucumber profile? cucumber features -p <profile_name>

What is cucumber.yml file in Ruby cucumber? It is used to create a profile

Ruby on Rails is an open source web


What is Ruby on Rails? application framework for the Ruby
programming language

Which of these is not an Environment variable present in RUBYLIBRARY


Ruby Cucumber?

What is the use of the "super" keyword in Ruby Rails? To call the superclass implementation
of the current method

What will be the outcome of the following code:


while i<7 do
Error for "i" not initialized
puts(i)
end

What is missing in the following code of Ruby Cucumber:


:name=>
$driver.text_field("email").set "email"

$driver.goto("http://
How can we open a Web URL in Ruby Cucumber?
10.207.182.108:81/opencart/")
How do we do a Dry-run in Ruby Cucumber? Cucumber features –dry-run
How do we open a Text file in Ruby Cucumber? $objFile=File.Open("Path",'r')
Command used for installing a Gem file gem install gemfile

What is missing in the following code for reading from a text


file:
$objFile.each do
??? |line|
puts line
end

Which of these commands is used to run a particular cucumber features/test.feature:21


scenario from a feature file?

What is missing in the following command used to generate


report using Ruby Cucumber?
--format
cucumber features/Opencart.feature ??? html –out
report.html

Syntax for writing XPATH in Ruby Cucumber is? :xpath=>

CSV.foreach("path") do
Which one of the followin is the correct way of reading data |row|
from a CSV file? puts row
end

What is missing in the following line of code used to invoke


the Excel Application in Ruby Cucumber? WIN32OLE
objExcel=???.new("Excel.Application")
objSheet=objExcel.workbooks.open("Pa
How do we open an Excel sheet through Ruby Cucumber? th").worksheets("Sheet1")

Feature: Visit XYZ page in abc.com


Which one of the following options is the correct form of Scenario : Visit abc.com
Given: I am on abc.com
writing a feature file? When: I click on XYZ page
Then: I should see ABC page

Which one of the following is correct? Given: I am on abc.com


*I click on login
"???" executes after the each step execution AfterStep
"???" execute before the feature file execution Before

"???" loads and processes the Ruby code from a separate


file, including whatever classes, modules, methods, and Require()
constants are in that file into the current scope

"-----" exercise the concept – “ You write test cases and then
TDD
develop the product that suits them"

"-----" criteria for the feature can be defined as when The


Product Owner, a Programmer and a Tester collaborate on Acceptance
system behaviour.

"-----" is a story testing approach.The functionalities written


by the Business Analyst's triggers the testing process BDD

"----" is an incremental and iterative software development Agile


model

"----" is a framework for writing and executing high level


descriptions of your software’s functionality. Cucumber

Which one of the following is not a specification file? nspec

What is the output of the following code:


In Begin
END {puts "In End"}
middle
BEGIN {puts "In Begin"}
In END
puts "middle"

What is the output of the following code:


age=3
x="double quoted {age}" double quoted {age}
y='single quoted {age}' single quoted {age}
puts x
puts y

What is the output of the following code:


message="Ruby Programming" Ruby Program
puts message[0,message.length-4]

What is the output of the following code:


.3 times do hello
hello
puts "hello" hello
end

What is the tag used for writing a scenario for Selenium in @selenium
Ruby Cucumber?

Which of the following is the Object locator used for finding


objects through Selenium in Ruby Cucumber? find_element

Which prefix is used to use/call the steps from a pre-defined %


scenario in Ruby Cucumber?
What is the output of the following code:
i=10
while i==10
puts "Hello {i}" Hello {i} (infinite times)
end

What is the output of the following code:

empdata={"Emp ID"=>"010","Name"=>"Kumar"} Kumar


puts empdata["Name"]

What is the output of the following code: Hello


10.downto(7) do Hello
puts "Hello" Hello
end Hello

What is the output of the following code:


while i<10
puts "Hello" Error because "i" is not initialized
end

What is the output of the following code:


i=0
while i<10
Hello - infinite times
puts "Hello"
end

What is the output of the following code:


i=0
while i==10 No Output
puts "Hello"
end

What is the output of the following code:


i=0
while i=10
puts "Hello" Hello - infinite times
end

What is the output of the following code:


i=0
while i=10
puts "Hello {i}" Hello {i} (infinite times)
end

Which of the following is the correct syntax for


invoking a firefox browser? Watir::Browser.new :firefox

What are the library files in Ruby/Cucumber called? Utils

What is the language used for expressing scenario in


Gherkin Language
feature file?
Which keyword is used to call a library file in your require
script?
Which of the following gem is required for accessing
an Excel file? Win32OLE

Which of the following gem is required for accessing csv


an CSV file?
Which of the following is not a keyword in Cucumber? Also

What are the 2 files required to execute a Cucumber


features,step_definiton
test scenario?
Which symbol is used to separate columns in Scenario |
Outline?
Which symbol is used as preffix to declare a variable
$
as public?
Which of the following is NOT a webDriver in
Cucumber? Phantom

What is the shortcut key to open setting in RubyMine


Ctrl+Alt+S
IDE?
What are before, after, beforeStep and afterStep in
Hooks
Cucumber?

Cucumber tags are used to filter


Why we use the tags for scenarios in Cucumber ? the scenarios and execute the
scenarios based on tags.

What preffix is used for adding a tag to a scenario? @

What is the syntax of executing all the feature files in cucumber features
a project from command line?

Where does the Cucumber execution starts from? support

It is used to load the required


What is env.rb used for? libraries for cucumber scenario
execution

"____" is the file extension for a ruby file cucumber? .rb

BDD stands for? Behaviour Driven Development

Which of the following is not a Agile methodology? BDD

Which testing model is best suited for the BDD


Agile
framework?
What is the default feature for parameterizing your Scenario Outline
scenario in Ruby?
"--------------" is the method available in Ruby
Cucumber to use the value of a variable inside a Interpolation
string?
This command is used to check the Ruby version
installed. ruby -v

Which file cannot be used to import data into Ruby


Cucumber? JS file

How do we define functions in Ruby Cucumber? def  <function_name>

How do we comment a block of code in Ruby CTRL+/


Cucumber?
Which one of the following is not a valid String
equal
command in Ruby Cucumber?
The command used for enering data in a text field in
.set
Ruby Cucumber?
Which command is used to check for the presence of
.exist?
an object in Ruby Cucumber?

How do we "Rename" a file in Ruby Cucumber? Refactor---->Rename

Shortcut for Running a Scenario in Ruby Cucumber? Shift+F10

Shortcut for Debugging a Scenario in Ruby Cucumber? Shift+F9

How can we a parameterize any input in the feature Write the parameter in double
file in Ruby Cucumber? quotes
Which one of the following is used to select a
.click
checkbox in Ruby Cucumber?
Which of the following is not part of a "feature" file in
Step_definition
Ruby Cucumber?
Cucumber is used for "------------" Testing? System & Integration Testing

A regular expression is a pattern


What is a Regular expression? describing a certain amount of text

Which of these we do NOT need to run a Cucumber Hooks


Web Test?

What does a features/support file contain? Features/ support file contains


supporting ruby code

How is the data seperated in a Scenario Outline in


Pipe(||)
Ruby Cucumber?

What is cucumber.yml file in Ruby cucumber? It is used to create a profile

Ruby on Rails is an open source


What is Ruby on Rails? web application framework for the
Ruby programming language

Which of these is not an Environment variable present RUBYLIBRARY


in Ruby Cucumber?
To call the superclass
What is the use of the "super" keyword in Ruby Rails? implementation of the current
method
Command used for installing a Gem file gem install gemfile

What is missing in the following line of code used to


invoke the Excel Application in Ruby Cucumber? WIN32OLE
objExcel=???.new("Excel.Application")

"???" executes after the each step execution AfterStep

"???" execute before the feature file execution Before

"???" loads and processes the Ruby code from a


separate file, including whatever classes, modules,
methods, and constants are in that file into the Require()
current scope

"-----" exercise the concept – “ You write test cases


TDD
and then develop the product that suits them"
"-----" criteria for the feature can be defined as when
The Product Owner, a Programmer and a Tester Acceptance
collaborate on system behaviour.

"-----" is a story testing approach.The functionalities


written by the Business Analyst's triggers the testing BDD
process
"----" is an incremental and iterative software
Agile
development model

"----" is a framework for writing and executing high Cucumber


level descriptions of your software’s functionality.

Which one of the following is not a specification file? nspec

What is the tag used for writing a scenario for @selenium


Selenium in Ruby Cucumber?

Which of the following is the Object locator used for find_element


finding objects through Selenium in Ruby Cucumber?

Which prefix is used to use/call the steps from a pre- %


defined scenario in Ruby Cucumber?

You might also like