SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
By Mithilesh Singh
Cucumber
Behavioral Driven Development
(BDD) is a software development
approach. It differs by being
written in a shared language,
which improves communication
between tech and non-tech teams
and stakeholders.
BDD
Why we use
BDD
• Let’s assume there is a requirement from a client for
an E Commerce website to increase the sales of the
product with implementing some new features on
the website, the only challenge of the development
team is to convert the client idea in to something
that actually delivers the benefits to client, The
origin idea is awesome but the only challenge here is
that the person who is developing the idea is not the
same person is not the same person who has that
idea. If the person who has the idea happens to be a
talented software developer. Then we might be in
luck the idea could be turned into working software
without even needing to be explained to anyone
else. Now the idea needs to be communicated and
has to travel from the business owner(client) to the
development team.
Note: Cucumber helps to improve communication
between technicalandnon-technicalmembersin the
same project
Gherkin
Keywords
* Feature.
* Scenario.
* Given.
*When.
*Then.
*And.
* Background
* Feature : Each Gherkinfile beginswith a Feature keyword.
Feature defines the logicaltest functionality
you willtest in this feature file
* Background : Backgroundkeywordis used to define steps that
are common to allthe tests in the feature file.
* Given : It is nothingbut precondition
*When : keyworddefinesthe test actionthat will be executed.
*Then : verificationofthe output with expected result
* And : keywordis used to add conditionsto your steps.
* But : Use to give negative type comments.
Difference between testNg explanation andCucumber explanation of a scenario
TestNg :
@Test
Public void testAdminUserCanUpdateUserAccPswd(){
// Create Users
User userAdmin = new User(UserRole.ADMIN, userName, Password);
Use admin user to update another user password
String message = userAdmin.updatePassword(user,user_new_password);
//Verify password changed
Assert.assertEquals(message,”password changed successfully”);
Assert. assertEquals(user.getPassword(), user_new_password);
}
Cucumber:
Feature : Update password
Scenario : Admin user can update the user password
Given : I am in the HR system with an admin account
When : I have updated passwordof the another user
Then : I receive a messagefor updating passwordsuccessfully
And : User’s password is updated to the new password.
Options available in cucumber:
dryRun : true : checks if all the feature file steps have created step
false: default condition
Features : set: the path of the feature file.
glue : set: the path of step definition file
tags : instruct: what tags in the feature file should be executed.
monochrome : true: display the console output in much readable way
format : set: different report format which we can use. E.g. html, json.
A. “Pretty” --print the gherkin source with additional colors
format={“pretty”}.
B. HTML : this will help to generate HTMLreports at the
location mentioned in the formatter itself.
format = {“html:Folder_Name”}.
C. Json : this report contains all the information from
the gherkin source in json
format={“json:Folder_Name/cucumber.json”}.
Notes
• 1.Cucumber options we always keep under the
@CucumberOptions annotation under the test runner class inside
our framework.
E.g.
@CucumberOptions(
features = "src/test/resources/features",
glue = "com/demo/qa/ui/steps",
tags = "not @ignore"
dryRun= true)
Components of the Cucumber framework:
1. Feature file
Scenariooutline : verify updating user passwordfeature.
Given : I am in the HR system with “<account_type>”account
And : There is another user with “<old_password>” password
When : I Update password of the user to “<new_password>”
Then : I got the message“<message>”
And : the user password should be “<final_password>”
2. Step definitionfile:
It is a smallpieceof code with a pattern attached to it.
Or
It is a java method in a classwith an annotation above it.
Note: Cucumber findsthe step definitionfilewith the help of glue code in
cucumber option.
3. RunnerClass:To execute the case we need cucumber test
runner class.
Data Driven Approach in Cucumber Framework:
A. parameterization without
an example keyword.
Scenario: Gmail login Test scenario
• Given User is already in login page
• WhenTitle of login page is Gmail
• Then user enters “ABC”and “test@123”
• Then user clicks on login button
• Then user is on home page
Note: we can not test for different no of test
inputs in this approach.To overcome this we have
to go with the approach 2
B. parameterization with example keyword
https://www.facebook.com/Testers-Zone-107916170837875/
Maven
Dependency
for Cucumber
CucumberWorkFlow
https://www.facebook.com/Testers-Zone-107916170837875/

Mais conteúdo relacionado

Semelhante a Cucumber Basics.pdf

Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress pluginAnthony Montalbano
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui TestingChristopherGTaylor
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Vpd Virtual Private Database By Saurabh
Vpd   Virtual Private Database By SaurabhVpd   Virtual Private Database By Saurabh
Vpd Virtual Private Database By Saurabhguestd83b546
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 
Spring-18 Internship at INSZoom
Spring-18 Internship at INSZoomSpring-18 Internship at INSZoom
Spring-18 Internship at INSZoomPadma Channal
 
Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Hossein Sarshar
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworksVishwanath KC
 
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16   dealing with the user modelTwo scoopsofdjango ch16   dealing with the user model
Two scoopsofdjango ch16 dealing with the user modelShih-yi Wei
 
maXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardmaXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardMax Kleiner
 
Comparison of different access controls
Comparison of different access controlsComparison of different access controls
Comparison of different access controlsRashmi Nair
 
Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7helpido9
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)IT PROGRAMMING WORLD
 
need help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxneed help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxniraj57
 

Semelhante a Cucumber Basics.pdf (20)

Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui Testing
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Vpd Virtual Private Database By Saurabh
Vpd   Virtual Private Database By SaurabhVpd   Virtual Private Database By Saurabh
Vpd Virtual Private Database By Saurabh
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
Spring-18 Internship at INSZoom
Spring-18 Internship at INSZoomSpring-18 Internship at INSZoom
Spring-18 Internship at INSZoom
 
Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level 
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16   dealing with the user modelTwo scoopsofdjango ch16   dealing with the user model
Two scoopsofdjango ch16 dealing with the user model
 
maXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardmaXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO Standard
 
Comparison of different access controls
Comparison of different access controlsComparison of different access controls
Comparison of different access controls
 
State management servlet
State management servletState management servlet
State management servlet
 
Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7
 
Devise and Rails
Devise and RailsDevise and Rails
Devise and Rails
 
Designing Modules in Python
Designing Modules in PythonDesigning Modules in Python
Designing Modules in Python
 
Acceptance tests
Acceptance testsAcceptance tests
Acceptance tests
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)
 
need help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxneed help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docx
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
Resume-Updated
Resume-Updated Resume-Updated
Resume-Updated
 

Mais de Mithilesh Singh (20)

Data Migration.pdf
Data Migration.pdfData Migration.pdf
Data Migration.pdf
 
SDLC Models.pdf
SDLC Models.pdfSDLC Models.pdf
SDLC Models.pdf
 
Test_Case_Design_Techniques
Test_Case_Design_TechniquesTest_Case_Design_Techniques
Test_Case_Design_Techniques
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Software_requirement_collection
Software_requirement_collectionSoftware_requirement_collection
Software_requirement_collection
 
Stub_&_Drive
Stub_&_DriveStub_&_Drive
Stub_&_Drive
 
Functional_Testing_Part-1
Functional_Testing_Part-1Functional_Testing_Part-1
Functional_Testing_Part-1
 
TestersMindSet 2022
TestersMindSet 2022TestersMindSet 2022
TestersMindSet 2022
 
API_Testing_with_Postman
API_Testing_with_PostmanAPI_Testing_with_Postman
API_Testing_with_Postman
 
Agile_basics
Agile_basicsAgile_basics
Agile_basics
 
Selenium_Grid
Selenium_GridSelenium_Grid
Selenium_Grid
 
Appium_set_up
Appium_set_upAppium_set_up
Appium_set_up
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
 
Alpha & Beta Testing
Alpha & Beta TestingAlpha & Beta Testing
Alpha & Beta Testing
 
Severity and Priority
Severity and PrioritySeverity and Priority
Severity and Priority
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Selenium-Locators
Selenium-LocatorsSelenium-Locators
Selenium-Locators
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
UI_UX_testing tips
UI_UX_testing tipsUI_UX_testing tips
UI_UX_testing tips
 
Emulator vs Simulator
Emulator vs SimulatorEmulator vs Simulator
Emulator vs Simulator
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Cucumber Basics.pdf

  • 3. Behavioral Driven Development (BDD) is a software development approach. It differs by being written in a shared language, which improves communication between tech and non-tech teams and stakeholders. BDD
  • 4. Why we use BDD • Let’s assume there is a requirement from a client for an E Commerce website to increase the sales of the product with implementing some new features on the website, the only challenge of the development team is to convert the client idea in to something that actually delivers the benefits to client, The origin idea is awesome but the only challenge here is that the person who is developing the idea is not the same person is not the same person who has that idea. If the person who has the idea happens to be a talented software developer. Then we might be in luck the idea could be turned into working software without even needing to be explained to anyone else. Now the idea needs to be communicated and has to travel from the business owner(client) to the development team. Note: Cucumber helps to improve communication between technicalandnon-technicalmembersin the same project
  • 5. Gherkin Keywords * Feature. * Scenario. * Given. *When. *Then. *And. * Background
  • 6. * Feature : Each Gherkinfile beginswith a Feature keyword. Feature defines the logicaltest functionality you willtest in this feature file * Background : Backgroundkeywordis used to define steps that are common to allthe tests in the feature file. * Given : It is nothingbut precondition *When : keyworddefinesthe test actionthat will be executed. *Then : verificationofthe output with expected result * And : keywordis used to add conditionsto your steps. * But : Use to give negative type comments.
  • 7. Difference between testNg explanation andCucumber explanation of a scenario TestNg : @Test Public void testAdminUserCanUpdateUserAccPswd(){ // Create Users User userAdmin = new User(UserRole.ADMIN, userName, Password); Use admin user to update another user password String message = userAdmin.updatePassword(user,user_new_password); //Verify password changed Assert.assertEquals(message,”password changed successfully”); Assert. assertEquals(user.getPassword(), user_new_password); } Cucumber: Feature : Update password Scenario : Admin user can update the user password Given : I am in the HR system with an admin account When : I have updated passwordof the another user Then : I receive a messagefor updating passwordsuccessfully And : User’s password is updated to the new password.
  • 8. Options available in cucumber: dryRun : true : checks if all the feature file steps have created step false: default condition Features : set: the path of the feature file. glue : set: the path of step definition file tags : instruct: what tags in the feature file should be executed. monochrome : true: display the console output in much readable way format : set: different report format which we can use. E.g. html, json. A. “Pretty” --print the gherkin source with additional colors format={“pretty”}. B. HTML : this will help to generate HTMLreports at the location mentioned in the formatter itself. format = {“html:Folder_Name”}. C. Json : this report contains all the information from the gherkin source in json format={“json:Folder_Name/cucumber.json”}.
  • 9. Notes • 1.Cucumber options we always keep under the @CucumberOptions annotation under the test runner class inside our framework. E.g. @CucumberOptions( features = "src/test/resources/features", glue = "com/demo/qa/ui/steps", tags = "not @ignore" dryRun= true)
  • 10. Components of the Cucumber framework: 1. Feature file Scenariooutline : verify updating user passwordfeature. Given : I am in the HR system with “<account_type>”account And : There is another user with “<old_password>” password When : I Update password of the user to “<new_password>” Then : I got the message“<message>” And : the user password should be “<final_password>” 2. Step definitionfile: It is a smallpieceof code with a pattern attached to it. Or It is a java method in a classwith an annotation above it. Note: Cucumber findsthe step definitionfilewith the help of glue code in cucumber option. 3. RunnerClass:To execute the case we need cucumber test runner class.
  • 11. Data Driven Approach in Cucumber Framework: A. parameterization without an example keyword. Scenario: Gmail login Test scenario • Given User is already in login page • WhenTitle of login page is Gmail • Then user enters “ABC”and “test@123” • Then user clicks on login button • Then user is on home page Note: we can not test for different no of test inputs in this approach.To overcome this we have to go with the approach 2
  • 12. B. parameterization with example keyword https://www.facebook.com/Testers-Zone-107916170837875/