Cucumber MCQ Questions And Answers - Software Quality
Cucumber MCQs : This section focuses on "basics" of Cucumber. These Multiple Choice Questions (MCQ) should be practiced to improve the Cucumber skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Which of the following are Advantages of Cucumber?
A. You can involve business stakeholders who cannot code
B. End-user experience is a priority
C. High code reuse
D. All of the above
View Answer
Ans : D
Explanation: Advantages of Cucumber are: You can involve business stakeholders who cannot code, End-user experience is a priority and High code reuse.
2. How many files required to execute a Cucumber test scenario?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : B
Explanation: Two files required to execute a Cucumber test scenario are : Features and Step Definition
3. A _____________ is the actual code implementation of the feature mentioned in the feature file.
A. scenario outline
B. given definition
C. step definition
D. None of the above
View Answer
Ans : C
Explanation: A step definition is the actual code implementation of the feature mentioned in the feature file.
4. Cucumber is Ruby-based?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: It is written in a Ruby programming language.
5. Rspec is used for?
A. Regression Testing
B. Unit Testing
C. Alpha Testing
D. System Testing
View Answer
Ans : B
Explanation: Rspec is used for Unit Testing.
6. Which keyword is used to combine two or more same type of action?
A. But
B. Or
C. And
D. Not
View Answer
Ans : C
Explanation: And is used to combine two or more same type of action.
7. In Cucumber, Comments will be denoted with?
A. !
B. @
C. $
D. #
View Answer
Ans : D
Explanation: Cucumber allows you to precede Feature and Scenario keywords with comments. Comments will be denoted with #.
8. __________ are the sticky notes you’ve put on pages you want to be able to find easily.
A. Object
B. Attribute
C. Tags
D. None of the above
View Answer
Ans : C
Explanation: Tags are the sticky notes you have put on pages you want to be able to find easily.
9. You can generate the output/report of the cucumber using different cucumber commands.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, You can generate the output/report of the cucumber using different cucumber commands.
10. When Cucumber finds a matching Step Definition it will execute it. If the block in the step definition doesn not raise an Exception, the step is marked as ?
A. undefined step
B. successful step
C. pending step
D. skipped step
View Answer
Ans : B
Explanation: When Cucumber finds a matching Step Definition it will execute it. If the block in the step definition doesn’t raise an Exception, the step is marked as successful (green).
Discussion