Cucumber Tool Interview Question-Answer

Q.1 Which of the following option is true for BDD Frameworks?
1. Increase misunderstanding
2. Reduce costs.
3. Collaborates development, not business analysts
4. Focuses on business value
5. Increase cost and business value

       A. 2,3,4,5

       B. 1,2,4

       C. 2,4

       D. 1,2,3,4,5

Ans : 2,4


Q.2 ________ is a BDD Tool.

       A. JBehave

       B. SpecFlow

       C. Cucumber

       D. Mocha

       E. All of the options

Ans : All of the options


Q.3 BDD concept was given by _____________.

       A. Dain North

       B. Dan North

       C. Sam North

       D. None of these

Ans : Dan North


Q.4 BDD stands for _____________.

       A. Business Data Driven

       B. Business-Driven Development

       C. Behavior-Driven Development

       D. Business Data Development

Ans : Behavior-Driven Development


Q.5 Cucumber feature file is written in ________.

       A. Ruby

       B. JavaScript

       C. Gherkin

       D. Java

Ans : Gherkin


Q.6 TDD is derived from BDD.

       A. True

       B. False

Ans : False


Q.7 Cucumber is an open-source TDD tool.

       A. True

       B. False

Ans : False


Q.8 Cucumber acts as a bridge between the business and technical aspects of a project.

       A. True

       B. False

Ans : True


Q.9 Cucumber is supported only on Eclipse IDE.

       A. True

       B. False

Ans : False


Q.10 Cucumber dependencies need _____.

       A. cucumber-core

       B. Cucumber-jvm-deps

       C. Cucumber-java

       D. All the options

Ans : All the options


Q.11 What does POM stand for?

       A. Program Object Model

       B. Project Oriented Model

       C. Project Object Model

       D. Program Oriented Model

Ans : Project Object Model


Q.12 What does CLI stands for?

       A. Constant Line Interface

       B. Command Line Interface

       C. Command Linear Interface

       D. Constant Linear Interface

Ans : Command Line Interface


Q.13 ____________ is the command to install and run Cucumber test.

       A. npm install

       B. mvn test

       C. npm test

       D. mvn clean install

Ans : mvn clean install


Q.14 Gherkin is a ________ language.

       A. Object-oriented

       B. Case-oriented

       C. Line-oriented

       D. Feature-oriented

Ans : Line-oriented


Q.15 Maven is use to inject dependency.

       A. True

       B. False

Ans : False


Q.16 Gherkins will take care of requirement.

       A. variable and object

       B. function

       C. True

       D. False

Ans : True


Q.17 Gherkin has two sections namely ______________.

       A. Both Feature and Scenario

       B. Feature

       C. Scenario

       D. None of the options

Ans : Both Feature and Scenario


Q.18 Gherkin supports ___________.

       A. 10 well knows languages

       B. few(2-3) languages

       C. around 60 well knows languages

       D. None of the options

Ans : around 60 well knows languages


Q.19 Gherkin is ______________.

       A. both simple and lightweight

       B. lightweight

       C. simple

       D. None of the options

Ans : both simple and lightweight


Q.20 Data table is separation can be done using ___.

       A. #data#

       B. |data|

       C. \ data \

       D. //data//

Ans : |data|


Q.21 To comment, we use _______.

       A. /*comment */

       B. #comment

       C. “comment”

       D. //comment

Ans : #comment


Q.22 When is used to define ____________.

       A. It defines expected outcome or result

       B. It defines scene of the scenario

       C. It defines the event or an action

       D. None of these

Ans : It defines the event or an action


Q.23 Given is used to define ____________.

       A. It defines expected outcome or result

       B. It defines scene of the scenario

       C. It defines the event or an action

       D. None of these

Ans : It defines scene of the scenario


Q.24 Feature file extension is ______.

       A. .feature

       B. .features

       C. .java

       D. None of these

Ans : .feature


Q.25 Scenario is used in file for _____________.

       A. defines feature

       B. define description

       C. business rule

       D. None of these

Ans : business rule


Q.26 Feature file starts with _____________.

       A. Feature

       B. Features

       C. Scenario

       D. Scenarios

Ans : Feature


Q.27 To define the executable java file we call it in _________.

       A. @CucumberOptions

       B. @RunWith()

       C. @Features

       D. @RunWith

Ans : @CucumberOptions


Q.28 Command to run the Cucumber file is _____________.

       A. @RunWith(Cucumber.class)

       B. @RunWith(Java.class)

       C. @RunWith(Java)

       D. @RunWith(Cucumber)

Ans : @RunWith(Cucumber.class)


Q.29 But is used to __________.

       A. Remove repetitive When

       B. Remove repetitive Then

       C. Remove repetitive Feature

       D. Remove repetitive Given

Ans : Remove repetitive Then


Q.30 And is used to __________.

       A. Remove repetitive When

       B. Remove repetitive Then

       C. Remove repetitive Feature

       D. Remove repetitive Given

Ans : Remove repetitive Given


Q.31 Maven command to create Java project is ____________.

       A. mvn archetype:generate -groupId=com.play.bdd -DartifactId=cucumber-jvm-maven -DarchetypeArtifactId=maven-archetype-quickstart

       B. mvn archetype:generate -DgroupId=com.play.bdd -DartifactId=cucumber-jvm-maven -DarchetypeArtifactId=maven-archetype-quickstart

       C. mvn archetype:generate -DgroupId=com.play.bdd -artifactId=cucumber-jvm-maven -DarchetypeArtifactId=maven-archetype-quickstart

       D. mvn archetype:generate -groupId=com.play.bdd -artifactId=cucumber-jvm-maven -DarchetypeArtifactId=maven-archetype-quickstart

Ans : mvn archetype:generate -DgroupId=com.play.bdd -DartifactId=cucumber-jvm-maven -DarchetypeArtifactId=maven-archetype-quickstart


Q.32 In our script file @Given ends with ___.

       A. #

       B. ^

       C. ::

       D. $

Ans : $


Q.33 To differentiate between singular and plural, __________.

       A. (?:text|texts)

       B. (.*text|texts)

       C. (*text|texts)

       D. (?text|texts)

Ans : (?:text|texts)


Q.34 Tag is used for ________.

       A. taggers feature inherit to all the scenarios in feature

       B. organize different data in feature files

       C. All these options are true

       D. Prefixes by @

Ans : All these options are true


Q.35 In our script file @Given starts with ___.

       A. ^

       B. ::

       C. #

       D. $

Ans : ^


Q.36 To match random character digit, _____.

       A. \\d+

       B. .*

       C. #

       D. $

Ans : .*


Q.37 Gherkin have two sections namely ______________.

       A. Features and Scenarios

       B. Feature and Scenarios

       C. Features and Scenario

       D. Feature and Scenario

Ans : Feature and Scenario


Q.38 Cucumber supports ______.

       A. Java

       B. JavaScript

       C. Ruby

       D. All of the options

Ans : All of the options


Q.39 Description is used in file for _________.

       A. Written as part of comments

       B. Writer description about scenario

       C. Write description about feature

       D. None of these

Ans : Write description about feature


Q.40 To get a random variable, ____________.

       A. (?love|hate|like)

       B. (*love|hate|like)

       C. (?:love|hate|like)

       D. (.*love|hate|like)

Ans : (?:love|hate|like)


Leave a Comment

Your email address will not be published. Required fields are marked *