Cucumber Flashcards
Explain Cucumber shortly
Cucumber is a tool that is based on Behavior Driven Development (BDD) methodology.
The main aim is to make QAs , Business Analysts, Developers understand the application without diving deep into the technical aspects.
What language is used by Cucumber
Gherkin - simple English representation of the application behavior
What is meant by a feature file?
a high-level description of an Application Under Test (AUT)
What are the various keywords that are used in Cucumber for writing a scenario?
Given
When
Then
And
What is the purpose of a Scenario Outline in Cucumber?
This is ideally used when the same scenario needs to be executed for multiple sets of data, however, the test steps remain the same.
What programming language is used by Cucumber?
multiple programming languages such as Java, .Net, Ruby etc.
It can also be integrated with multiple tools such as Selenium
What is the purpose of the Step Definition file in Cucumber?
to segregate the feature files from the underlying code.
Step Definition files are written in programming languages
What are the major advantages of the Cucumber framework?
Cucumber is an open-source tool.
Plain Text bridges communication gap
Easy to maintain and understand
Easy integration
Provide an example of a feature file using the Cucumber framework.
Feature: Login to the application under test.
Scenario: Login to the application.
Given the Open Chrome browser and launch the application.
When the user enters the username onto the UserName field.
And User enters the password into the Password field.
When the user clicks on the Login button.
Then Validate if the user login is successful.
Provide an example of a Scenario Outline using the Cucumber framework.
Scenario Outline: Upload a file
Given that the user is on upload file screen.
When a user clicks on the Browse button.
And user enters onto the upload textbox.
And user clicks on the enter button.
Then verify that the file upload is successful.
What is the purpose of the Behaviour Driven Development (BDD) methodology in the real world?
to understand the functionality of an application in simple plain text representation.
What is the limit for the maximum number of scenarios that can be included in the feature file?
a maximum of 10 scenarios
What is the use of Background keyword in Cucumber?
to group multiple given statements into a single group
What symbol is used for parameterization in Cucumber?
Pipe symbol (|) is used to specify one or more parameter values in a feature file.
What is the purpose of Examples keyword in Cucumber?
to specify values for each parameter used in the scenario. Scenario Outline keyword must always be followed by the keyword Examples.