Bdd Framework/Cucumber BDD mcq Sample Test,Sample questions

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




4.Both (A) and (B)

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

 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 11:38:14

 What of these are valid result states returned by cucumber?


2.Passed , Skipped


4.All of the above

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

 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 11:14:19

 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 11:23:16

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 10:41:40

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*


4.. d

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

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





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

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




4.All of the above

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

Gherkin assist in providing which of these purposes?

1.Automated Testing



4.both a and b

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

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




2. tbl_account



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

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 11:27:45

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 10:47:20

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 10:39:38

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 10:54:37

Which of the following frameworks integrations is supported by cucumber?


2. Ruby on Rails


4.All of the above

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

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 10:50:14

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 11:30:10

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





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

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 11:07:47

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 10:31:33

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 11:15:45

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 11:29:05

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?




4.both a and b

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

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 10:32:24

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 10:40:31

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 11:22:16

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 11:12:25

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 11:10:17

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 11:19:47

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?


4.If scenario.failed

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


  1. BDD Mcq
  2. Cucumber BDD mcq
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on 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!