Scenario:
APL Ace Premiere League has reached out to Accenture for the enhancement and testing of their
existing application from domestic to global level and for that they were planning to use agile
methodology and inline BDD framework.
And they have also given information of user scenario and business requirements like
A team must have 2 to 4 overseas player
A team must have one uncapped player
And for business requirements
A player can have multiple teams if it is in public mode
And a player can have one team in private mode
Agile Methodology: Agile is a project management approach in which developing and testing
happens parallel. In agile we release the project in an iteration manner as we break the project into
sprints.
Types of records: Default mode or context sensitive recording
Low level record
Analog Mode
Insight mode
GlueCode In Cucumber Glue code is used to specify the package that contains the stepdefinations. In
the glue under @CucumberOptions we specify the package to load the gluecode.
Gherkin Keywords Given, When, And, Then, Scenario, Scenario Outline, Background etc.
Language used in Cucumber – English and Java for for stepdefination class.
Runner Class: - A runner class in Cucumber is a class that allows for the development of project, the
selection of scenarios to run, and the creation of test reports. These parameters are written within
the @CucumberOptions annotion.
Feature File: - A feature file is the essential segment of Cucumber tool which contains the
description of test writing in normal English using Gherkin Keywords.
BDD vs TDD Difference: - BDD means Behaviour Driven Development in which we describes the
behaviour of the application which needs to be tested. Basically in BDD we put more emphasis on 3
practices Discovery, Formulation & Automation.
TDD means Test Driven development is a testing methodology that fits into programming practice
from the developer’s point of view. In TDD we write the failing test case with the intention to make
the test case pass > Execute the test and Refactor the code.
Importance of using Cucumber: - Cucumber is nothing but a testing tool which is used to bridge the
gap between the technical people and the non - technical people (like Business analyst, stakeholders
clients etc.) in project. In feature file we describes different scenarios which needs to be tested in
normal English using some Gherkin keywords
Step Defination Path :- src/test/java/Folder/new package/ new java class
Difference between Selenium and Cucumber
1. Selenium is an open source automation tool that automates the testing of Web Applications
across various platforms while Cucumber is a software testing process that deals with an
application's behaviour. It tests applications as a behaviour-driven development (BDD) style.
2. Language supported in Selenium is java python ruby C++ C# while in cucumber we write the
features in normal English using some gherkin keywords
3. In selenium only technical people will understand the code but In cucumber by reading the
feature file even non - technical people like stakeholders or the clients will also understand the
scenarios.
Page Object Model is a design pattern which tells us to separate the locator code and the test code
into two different sections
Hooks are basically the block of codes that can run at various points in the Cucumber execution
cycle. They are typically used for the setup and teardown of the environment before each scenario
Library is used to call the functionalities from the pre - existing class or methods while Plugin is used
to extend the functionalities.
Scenario means the sequence of steps that represents how an application should behave expected
by user.
Scenario Outline means to run the same scenario multiple times but with different set of values.
a method that links to one or more Gherkin steps using an
expression. When Cucumber executes a Gherkin step in a scenario, it will
look for a matching step definition to execute.