SlideShare uma empresa Scribd logo
1 de 14
QA WEEKLY TRAINING
TOPIC: BEHAVIOR DRIVEN DEVELOPMENT(BDD) BY USING CUCUMBER PLUGIN
IN CYPRESS
BDD AND TDD
BDD KEY WORDS
• BEHAVIOR DRIVEN DEVELOPMENT(BDD)
• GIVEN
• WHEN
• THEN
EXAMPLE LOGIN FEATURE FILE 1
• FEATURE: LOGIN
• I WANT TO LOG INTO WEBSITE
• SCENARIO: WEBSITE LOGIN
• GIVEN I OPEN WEBSITE LOGIN PAGE
• WHEN I TYPE IN USERNAME AND PASSWORD
• AND I CLICK ON SIGN IN BUTTON
• THEN DASHBOARD PAGE SHOULD BE SHOWN
STEP DEFINITION FILE
• GIVEN(‘ I OPEN THE WEBSITE LOGIN PAGE’, () => {
• --CY.VISIT (‘URL’)
• {);
• GIVEN (‘’,() => {
• });
• WHEN (‘’,() => {
• });
• THEN (‘’, () =>{
• });
EXAMPLE LOGIN FEATURE FILE 2
EXAMPLE STEP DEFINITION FILE
BDD – CUCUMBER – INSTALLATION AND
SETUP
BDD – CUCUMBER – INSTALLATION AND
SETUP
• --NPM INSTALL CYPRESS-CUCUMBER-PREPROCESSOR
• IN CYPRESS.JSON FILE ADD THIS "TESTFILES":"**/*.FEATURE" , AFTER CYPRESS 10
NOW IN PACKAGE.JSON FILE
• CREATE A FILE IN INTEGRATION FOLDER FOR EXAMPLE “ABC.FEATURE” AND
FOLDER WITH SAME NAME AS FEATURE FILE FOR EXAMPLE “ABC” IN
INTEGRATION FOLDER.
• CREATE A STEP DEFINITION FILE WITHIN THE FOLDER “ABC” FOR EXAMPLE
LOGIN.JS
• NOTE: STEP DEFINITION FILE COULD BE NAME ANYTHING AS YOU WISH
CONFIGURATION
• PLEASE MAKE USE OF COSMICONFIG TO CREATE A CONFIGURATION FOR THE
PLUGIN, FOR EXAMPLE, BY ADDING THIS SECTION TO YOUR PACKAGE.JSON:
• "CYPRESS-CUCUMBER-PREPROCESSOR":{
• "NONGLOBALSTEPDEFINATIONS": TRUE
• }
• -NPM INSTALL COSMICONFIG
BDD – CUCUMBER – INSTALLATION AND
SETUP
ADD IT TO YOUR PLUGINS:
• CYPRESS/PLUGINS/INDEX.JS
• CONST CUCUMBER = REQUIRE('CYPRESS-CUCUMBER-PREPROCESSOR').DEFAULT
•
MODULE.EXPORTS = (ON, CONFIG) => {
• ON('FILE:PREPROCESSOR', CUCUMBER())
• }
THANKS
TMMI

Mais conteúdo relacionado

Semelhante a Behavior Driven Development(BDD) by using Cucumber Plugin in Cypress

Cloud Study Jam - ML API 4
Cloud Study Jam -  ML API 4Cloud Study Jam -  ML API 4
Cloud Study Jam - ML API 4Duran Hsieh
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
CBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBoxCBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBoxOrtus Solutions, Corp
 
Bring Your Own Container: Using Docker Images In Production
Bring Your Own Container: Using Docker Images In ProductionBring Your Own Container: Using Docker Images In Production
Bring Your Own Container: Using Docker Images In ProductionDatabricks
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalChris Wu
 
Introduction to bdd
Introduction to bddIntroduction to bdd
Introduction to bddantannatna
 
Windows Azure: Lessons From the Field
Windows Azure: Lessons From the FieldWindows Azure: Lessons From the Field
Windows Azure: Lessons From the FieldMichael Collier
 
.NET Day 2022 - Fast feedback with pull request deployments
.NET Day 2022 - Fast feedback with pull request deployments.NET Day 2022 - Fast feedback with pull request deployments
.NET Day 2022 - Fast feedback with pull request deploymentsMarc Müller
 
Introduction to SQL Server Security
Introduction to SQL Server SecurityIntroduction to SQL Server Security
Introduction to SQL Server SecurityJason Strate
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAEWinston Chen
 
建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版Joseph Chiang
 
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...Rudy Jahchan
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesAtlassian
 

Semelhante a Behavior Driven Development(BDD) by using Cucumber Plugin in Cypress (20)

qooxdoo 3.5
qooxdoo 3.5qooxdoo 3.5
qooxdoo 3.5
 
Cloud Study Jam - ML API 4
Cloud Study Jam -  ML API 4Cloud Study Jam -  ML API 4
Cloud Study Jam - ML API 4
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
CBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBoxCBDW2014 - Behavior Driven Development with TestBox
CBDW2014 - Behavior Driven Development with TestBox
 
Bring Your Own Container: Using Docker Images In Production
Bring Your Own Container: Using Docker Images In ProductionBring Your Own Container: Using Docker Images In Production
Bring Your Own Container: Using Docker Images In Production
 
Selenium再入門
Selenium再入門Selenium再入門
Selenium再入門
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
 
Introduction to bdd
Introduction to bddIntroduction to bdd
Introduction to bdd
 
Windows Azure: Lessons From the Field
Windows Azure: Lessons From the FieldWindows Azure: Lessons From the Field
Windows Azure: Lessons From the Field
 
.NET Day 2022 - Fast feedback with pull request deployments
.NET Day 2022 - Fast feedback with pull request deployments.NET Day 2022 - Fast feedback with pull request deployments
.NET Day 2022 - Fast feedback with pull request deployments
 
ETI SEO.pptx
ETI SEO.pptxETI SEO.pptx
ETI SEO.pptx
 
ETI SEO.pptx
ETI SEO.pptxETI SEO.pptx
ETI SEO.pptx
 
Advanced Index Tuning
Advanced Index TuningAdvanced Index Tuning
Advanced Index Tuning
 
Introduction to SQL Server Security
Introduction to SQL Server SecurityIntroduction to SQL Server Security
Introduction to SQL Server Security
 
J query ppt
J query pptJ query ppt
J query ppt
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAE
 
建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版
 
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket Pipelines
 

Mais de Arshad QA

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
API Automation in Rest Assured by using BDD Approach with TestNG
API Automation in Rest Assured by using BDD Approach with TestNGAPI Automation in Rest Assured by using BDD Approach with TestNG
API Automation in Rest Assured by using BDD Approach with TestNGArshad QA
 
QATraining20Feb2023.pptx
QATraining20Feb2023.pptxQATraining20Feb2023.pptx
QATraining20Feb2023.pptxArshad QA
 
QATraining27Feb2023.pptx
QATraining27Feb2023.pptxQATraining27Feb2023.pptx
QATraining27Feb2023.pptxArshad QA
 
STC_InHouseDevelopment.pptx
STC_InHouseDevelopment.pptxSTC_InHouseDevelopment.pptx
STC_InHouseDevelopment.pptxArshad QA
 
STC-TestAutomation.pptx
STC-TestAutomation.pptxSTC-TestAutomation.pptx
STC-TestAutomation.pptxArshad QA
 
Cypress.pptx
Cypress.pptxCypress.pptx
Cypress.pptxArshad QA
 
ISTQB-FL.pptx
ISTQB-FL.pptxISTQB-FL.pptx
ISTQB-FL.pptxArshad QA
 
JMeter_Performance Testing.pptx
JMeter_Performance Testing.pptxJMeter_Performance Testing.pptx
JMeter_Performance Testing.pptxArshad QA
 
NewRelic.pptx
NewRelic.pptxNewRelic.pptx
NewRelic.pptxArshad QA
 
RestAssured.pptx
RestAssured.pptxRestAssured.pptx
RestAssured.pptxArshad QA
 

Mais de Arshad QA (12)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
API Automation in Rest Assured by using BDD Approach with TestNG
API Automation in Rest Assured by using BDD Approach with TestNGAPI Automation in Rest Assured by using BDD Approach with TestNG
API Automation in Rest Assured by using BDD Approach with TestNG
 
QATraining20Feb2023.pptx
QATraining20Feb2023.pptxQATraining20Feb2023.pptx
QATraining20Feb2023.pptx
 
QATraining27Feb2023.pptx
QATraining27Feb2023.pptxQATraining27Feb2023.pptx
QATraining27Feb2023.pptx
 
STC_InHouseDevelopment.pptx
STC_InHouseDevelopment.pptxSTC_InHouseDevelopment.pptx
STC_InHouseDevelopment.pptx
 
STC-TestAutomation.pptx
STC-TestAutomation.pptxSTC-TestAutomation.pptx
STC-TestAutomation.pptx
 
Cypress.pptx
Cypress.pptxCypress.pptx
Cypress.pptx
 
ISTQB-FL.pptx
ISTQB-FL.pptxISTQB-FL.pptx
ISTQB-FL.pptx
 
JMeter_Performance Testing.pptx
JMeter_Performance Testing.pptxJMeter_Performance Testing.pptx
JMeter_Performance Testing.pptx
 
NewRelic.pptx
NewRelic.pptxNewRelic.pptx
NewRelic.pptx
 
RestAssured.pptx
RestAssured.pptxRestAssured.pptx
RestAssured.pptx
 

Último

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Behavior Driven Development(BDD) by using Cucumber Plugin in Cypress

  • 1. QA WEEKLY TRAINING TOPIC: BEHAVIOR DRIVEN DEVELOPMENT(BDD) BY USING CUCUMBER PLUGIN IN CYPRESS
  • 3. BDD KEY WORDS • BEHAVIOR DRIVEN DEVELOPMENT(BDD) • GIVEN • WHEN • THEN
  • 4. EXAMPLE LOGIN FEATURE FILE 1 • FEATURE: LOGIN • I WANT TO LOG INTO WEBSITE • SCENARIO: WEBSITE LOGIN • GIVEN I OPEN WEBSITE LOGIN PAGE • WHEN I TYPE IN USERNAME AND PASSWORD • AND I CLICK ON SIGN IN BUTTON • THEN DASHBOARD PAGE SHOULD BE SHOWN
  • 5. STEP DEFINITION FILE • GIVEN(‘ I OPEN THE WEBSITE LOGIN PAGE’, () => { • --CY.VISIT (‘URL’) • {); • GIVEN (‘’,() => { • }); • WHEN (‘’,() => { • }); • THEN (‘’, () =>{ • });
  • 8. BDD – CUCUMBER – INSTALLATION AND SETUP
  • 9. BDD – CUCUMBER – INSTALLATION AND SETUP • --NPM INSTALL CYPRESS-CUCUMBER-PREPROCESSOR • IN CYPRESS.JSON FILE ADD THIS "TESTFILES":"**/*.FEATURE" , AFTER CYPRESS 10 NOW IN PACKAGE.JSON FILE • CREATE A FILE IN INTEGRATION FOLDER FOR EXAMPLE “ABC.FEATURE” AND FOLDER WITH SAME NAME AS FEATURE FILE FOR EXAMPLE “ABC” IN INTEGRATION FOLDER. • CREATE A STEP DEFINITION FILE WITHIN THE FOLDER “ABC” FOR EXAMPLE LOGIN.JS • NOTE: STEP DEFINITION FILE COULD BE NAME ANYTHING AS YOU WISH
  • 10. CONFIGURATION • PLEASE MAKE USE OF COSMICONFIG TO CREATE A CONFIGURATION FOR THE PLUGIN, FOR EXAMPLE, BY ADDING THIS SECTION TO YOUR PACKAGE.JSON: • "CYPRESS-CUCUMBER-PREPROCESSOR":{ • "NONGLOBALSTEPDEFINATIONS": TRUE • } • -NPM INSTALL COSMICONFIG
  • 11. BDD – CUCUMBER – INSTALLATION AND SETUP
  • 12. ADD IT TO YOUR PLUGINS: • CYPRESS/PLUGINS/INDEX.JS • CONST CUCUMBER = REQUIRE('CYPRESS-CUCUMBER-PREPROCESSOR').DEFAULT • MODULE.EXPORTS = (ON, CONFIG) => { • ON('FILE:PREPROCESSOR', CUCUMBER()) • }
  • 14. TMMI