Bdd Framework/Cucumber BDD mcq Sample Test,Sample questions

Question:
 In order to install Cucumber on a MacOS platform, which of these packages is required.

1.Xcode

2.Ruby

3.Python

4.Both (A) and (B)

Posted Date:-2022-11-18 04:02:38


Question:
 Step definition usually resides in the features/ step definitions / directory. Cucumber expects your step definition file to eb named in a specific format. What must your step definition filename end with

1._steps .feature

2.steps .rb

3.- - steps .rb

4._stepdefinitions .rb

Posted Date:-2022-11-18 04:38:14


Question:
 What of these are valid result states returned by cucumber?

1.Fail

2.Passed , Skipped

3.Undefined

4.All of the above

Posted Date:-2022-11-18 03:45:38


Question:
 Which of these step definition achieves this for you? Which of these step definition achieves this for you?
You are designing a regular expression to capture and expression from this step.
Given the input 99+1

Given(/^input([^”]*)$/) do|input|

1.Given(/^the input (d)$/) do|input|

2.Given(/^the input (#)$/) do|input|

3.None(empty disk)

4.Given(/^the input (^”)$/) do|input|

Posted Date:-2022-11-18 04:14:19


Question:
 You are working with a data table and you want to use of reference of that data table in your step definitions as a multi-dimensional array. Assuming the name of the argument your step passes when capturing the table is “Table” and the array is to be named “@vehicle” which of those will accomplish your requirement

1.@vehicle = table.hash

2.@vehicle = table.raw

3.@vehicle.array = table

4.@vehicle = table.array

Posted Date:-2022-11-18 04:23:16


Question:
Complete the code statement so that the default profile runs the other two profiles whne no profiles is specified at the command line
Default :

Html_report : -f progress -f html -o features_report.html

Test1001 : -t @test1001

1.-p html_report -p test1001

2.-f html_report -f test1001

3.-p html_report test1001

4.-f html_report test1001

Posted Date:-2022-11-18 03:41:40


Question:
Cucumber makes extensive use of character classes and quantifiers to match strings. You want to match and integer value of 100 using regex character classes and quantifiers. Which od these produces an exact match?

1. D*

2. d*

3.dd

4.. d

Posted Date:-2022-11-18 04:32:12


Question:
Cucumber uses a plain text parser to assist in the definition of the test cases. What is the name of this plain text parser?

1.Pythumber

2.Gherkin

3.Cuke

4.Relish

Posted Date:-2022-11-18 04:18:16


Question:
Each scenario in feature file contains lists of steps that begin with which of the following keywords?

1.When

2.Given

3.Then

4.All of the above

Posted Date:-2022-11-18 04:24:03


Question:
Gherkin assist in providing which of these purposes?

1.Automated Testing

2.Documentation

3.Assertion

4.both a and b

Posted Date:-2022-11-18 04:26:43


Question:
Given the database has been created for an accounts table, complete the code properly define the class for the table inheriting form ActiveRecord ::ABse?
Class ActiveRecord :: Base

end

tbl_account

1.tbl_accounts

2. tbl_account

3.Accounts

4.Account

Posted Date:-2022-11-18 03:57:35


Question:
The World object can be used to pass instance variables by defining instance variable in a module and using Cucumber’s World method to mix that module in to the World Project. Which of these statements describes the subsequent functions of the world object?

1.A new World object is created for each scenario thereby ensuring isolation

2.When the World object is destroyed , it’s defined methods are destroyed.

3.both (a) and (b)

4.None of These

Posted Date:-2022-11-18 04:27:45


Question:
What are the two primary approaches when testing REST APIs with cucumber?

1. In Progress Approach

2.Out of process Approach

3.Last Response Approach

4.both a and b

Posted Date:-2022-11-18 03:47:20


Question:
Which flag must you use with cucumber in order to tell it that you want to run from the root of the features folder, thereby allowing you to organize your features in subdirectories?

1.-use features

2.-require features

3.-r root

4.-require root

Posted Date:-2022-11-18 03:39:38


Question:
Which flags could you use to format the cucumber output to display useful information about the time that each step took to run?

1.a. Usage

2.d. Stepdefs

3.c. Debug

4.both a and b

Posted Date:-2022-11-18 03:54:37


Question:
Which of the following frameworks integrations is supported by cucumber?

1.Serenity

2. Ruby on Rails

3.Selenium

4.All of the above

Posted Date:-2022-11-18 03:33:17


Question:
Which of the following statement accurately describe the use of Transforms?

1.Transforms may be applied globally

2.Allows the ability to transform step argument

3.Transforms cannot be applied globally

4.Both (A) and (B)

Posted Date:-2022-11-18 03:50:14


Question:
Which of these following statement accurately describe characteristics of Acceptance Test Driven Development (ATDD) when compared to Behavior Driven Development(BDD)?

1.ATDD is more focused on technical aspects

2.ATDD is more development focused than BDD

3.both (a) and (b)

4.ATDD is primarily focused on non-technical aspects

Posted Date:-2022-11-18 04:30:10


Question:
Which of these is the top level when participating in an example mapping exercise?

1.Example

2.Question

3.Story

4.Rule

Posted Date:-2022-11-18 04:16:58


Question:
Which of these statements accurately describe characteristics of the BDD?

1.BDD makes use of acceptance tests C. Combines techniques and principle from waterfall methodology.

2.Requires that you build software first then the unit test afterwards.

3.An Agile software development methodology

4.All of the above

Posted Date:-2022-11-18 04:07:47


Question:
Which of these statements accurately describes synchronizing by listening?

1.Typically, the fastest method

2.The system files event at specific points

3.Typically, the most reliable method

4.All of the above

Posted Date:-2022-11-18 03:31:33


Question:
Which of these would be valid reasons for using a scenario outlines in a feature files?

1.There are several scenarios differing only on values

2.To assist with the reading and understanding of the scenario.

3.There is only one scenario in the features file.

4.both a and b

Posted Date:-2022-11-18 04:15:45


Question:
While using a scenario outline, which character are used to delimit the placeholder for your Examples table?

1.”” “”” Triple quotes

2.angle bracket

3.| | Pipe Character

4.{ } curly braces

Posted Date:-2022-11-18 04:29:05


Question:
You are participating in an example mapping exercise. The story is ‘The system must force users to use strong password’ and one of the rule that your team has identified is that users’ passwords must contain a numeric character. Which of these examples demonstrate a violation of this rule?

1.$trong

2.strongtwo

3.String11

4.both a and b

Posted Date:-2022-11-18 04:06:17


Question:
You are using DatabaseCleaner in truncation mode to clean a database between scenarios. Where is the optimum place to run DataCleaner in truncation mode?

1.In the Truncate hook

2.In an After hook

3.In the before hook

4.In a Failure hook

Posted Date:-2022-11-18 03:32:24


Question:
You are using tags to label and run scenarios. You want to run only those sceanrios that are tagged with both the @sellwidgets and @buywidgets tags. Which command will accomplish this?

1.cucumber -tags @sellwidgets && @buywidgets

2.cucumber -tags @sellwidgets , @buywidgets

3.cucumber -tags @sellwidgets || @buywidgets

4.cucumber -tags @sellwidgets - - tags @buywidgets

Posted Date:-2022-11-18 03:40:31


Question:
You are working with nested steps in cucumber and you see the built in cucumber ‘steps’ method to define a number of lower level steps. Which Ruby construct can you employ to indicate that you have a string that will go across multiple lines?

1.^{ }

2.%{ }

3. ${ }

4.#{ }

Posted Date:-2022-11-18 04:22:16


Question:
You have an instance variable ‘@result’ and you want to use an Repec-based assertion to test the value of ‘@result’ with an argument identified as ‘expected_output’ in a Then Step. Which of the following statements ac3. You have an instance variable ‘@result’ and you want to use an Repec-based assertion to test the value of ‘@result’ with an argument identified as ‘expected_output’ in a Then Step. Which of the following statements accomplish this for you?complish this for you?

1.expect(@result) eq expect(executed_output)

2.expect(@result).eq executed_output

3.expect(@result).to eq executed_output

4.expect(@result) = expect(executed_output)

Posted Date:-2022-11-18 04:12:25


Question:
You have installed Ruby and Xo=code on your OSX development machine and you want to use bundler to manage your Ruby gems. Which statement correctly installs bundler?

1.ruby gem bundle

2.gem install bundler

3.ruby - - install bundler

4.npm bundler

Posted Date:-2022-11-18 04:10:17


Question:
You want to create and html report using one of the cucumbers formatters . Which of the following statements does this correctly.

1.cucumber -f html

2.cucumber - output cucumber.html

3.cucumber -f html - - output cucumber.html

4.cucumber -f cucumber.html

Posted Date:-2022-11-18 04:19:47


Question:
You want to print a message form an after hook to the console when running a scenario. If that scenario fails. Complete the code that will accomplish this.
Puts “Something had happened ”

1.If scenario.failed?

2.If scenario.state.failure?

3.If scenario.state.fail

4.If scenario.failed

Posted Date:-2022-11-18 03:30:10


More MCQS

  1. BDD Mcq
  2. Cucumber BDD mcq
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!