SlideShare une entreprise Scribd logo
1  sur  23
Are you writing Acceptance test
yet?
Ravi Okade
The Why
http://www.projectcartoon.com/cartoon/2
Who is to blame?
People?
Process?
Language?
Acceptance Tests,
BDD (we will talk about this later)
Acceptance Tests
Business Analyst + Tester:
- Write clear requirements
- Uses consistent language (DSL)
- Cover all scenarios
Developer:
- Write code to make the requirement work
- Write test matching the requirement (verbatim)
Result: What you ask for is what will be built (and tested)
The How
Example mapping
https://cucumber.io/blog/example-mapping-introduction/
Who does what
https://cucumber.io/bdd/who-does-what/
A simple application
Calculates Discount on a website:
- For NJ or PA residents 10%
- For software developers 10%
- For Senior Citizens 15%
- For everyone else 5%
How would you write the requirements?
- If I am a NJ resident, I expect a 10% discount
- If I am a PA resident, I expect a 10% discount
- If I am a developer, I expect a 10% discount
- If I am a senior citizen, I expect a 15% discount
- I am a CA resident, a realtor, not a senior citizen. I expect 5% discount
The requirement written as a Gherkin Feature/Scenario
Which is also a test!
Gherkin keywords
Demo
- Test the calculator feature (API test)
- Test the website using the same feature (end-to-end test)
- Common implementation across languages - do it in another language (Java)
https://github.com/ravirepo/cucumber-dotnet
https://github.com/ravirepo/cucumber-java
Scenario Outlines - when you have many of the same
Datatables for test input data
You are now ready for BDD
BDD
- Requirements are in Given/When/Then format (or close)
- Requirements cover all scenarios
- Write acceptance tests (failing)
- Write code to make tests pass
Benefits:
- Living documentation
- No unused code and No requirement missing!
https://cucumber.io/bdd/
Tooling
Cucumber: Java
Specflow, Pickles: Dot Net
Jasmine, Jest: Javascript
Selenium: Web automation
Advanced topics
Virtualization (Contract Testing)
BDD
Types of tests
https://martinfowler.com/bliki/TestPyramid.html
Candidates for
Acceptance tests
References
https://www.infoq.com/articles/Spec-Flow
https://testingbot.com/support/getting-started/specflow.html
https://www.youtube.com/playlist?list=PL6tu16kXT9PqKSouJUV6sRVgmcKs-VCqo
https://specflow.org/getting-started/

Contenu connexe

Tendances

Sharing bridge SE working experience of myself
Sharing bridge SE working experience of myselfSharing bridge SE working experience of myself
Sharing bridge SE working experience of myself
Duy Tan Geek
 
Working effectively with legacy code chapter1
Working effectively with legacy code chapter1Working effectively with legacy code chapter1
Working effectively with legacy code chapter1
Hiroaki NAKADA
 

Tendances (10)

Sharing bridge SE working experience of myself
Sharing bridge SE working experience of myselfSharing bridge SE working experience of myself
Sharing bridge SE working experience of myself
 
Working effectively with legacy code chapter1
Working effectively with legacy code chapter1Working effectively with legacy code chapter1
Working effectively with legacy code chapter1
 
DBC Principles
DBC PrinciplesDBC Principles
DBC Principles
 
IT Career Planning
IT Career PlanningIT Career Planning
IT Career Planning
 
Love Vs Arranged Marriage
Love Vs Arranged MarriageLove Vs Arranged Marriage
Love Vs Arranged Marriage
 
Pair Programming (2015)
Pair Programming (2015)Pair Programming (2015)
Pair Programming (2015)
 
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
 
How to Version your API
How to Version your APIHow to Version your API
How to Version your API
 
German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...
 
BDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous DeliveryBDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous Delivery
 

Similaire à Are you writing acceptance test yet?

Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
Sakares Saengkaew
 
Premanand_Jha
Premanand_JhaPremanand_Jha
Premanand_Jha
Prem Jha
 
English_Resume_KexiongSong
English_Resume_KexiongSongEnglish_Resume_KexiongSong
English_Resume_KexiongSong
Kexiong Song
 
Alhussain Zarban - CV (8) additional
Alhussain Zarban - CV (8) additionalAlhussain Zarban - CV (8) additional
Alhussain Zarban - CV (8) additional
hasooona7
 
Samarendra_3+ Year_Software Testing
Samarendra_3+ Year_Software TestingSamarendra_3+ Year_Software Testing
Samarendra_3+ Year_Software Testing
Samarendra Sahoo
 

Similaire à Are you writing acceptance test yet? (20)

BDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practicesBDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practices
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
Phpers day 2019
Phpers day 2019Phpers day 2019
Phpers day 2019
 
HOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptxHOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptx
 
Megha_Sawant
Megha_SawantMegha_Sawant
Megha_Sawant
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
Premanand_Jha
Premanand_JhaPremanand_Jha
Premanand_Jha
 
Documentation by the Techies, for the Techies; Documentation in Agile
Documentation by the Techies, for the Techies; Documentation in AgileDocumentation by the Techies, for the Techies; Documentation in Agile
Documentation by the Techies, for the Techies; Documentation in Agile
 
Srinivasan Venkatesan Resume
Srinivasan Venkatesan ResumeSrinivasan Venkatesan Resume
Srinivasan Venkatesan Resume
 
Abhishek Panwar
Abhishek PanwarAbhishek Panwar
Abhishek Panwar
 
English_Resume_KexiongSong
English_Resume_KexiongSongEnglish_Resume_KexiongSong
English_Resume_KexiongSong
 
CCDE Experience
CCDE ExperienceCCDE Experience
CCDE Experience
 
Sap sd material
Sap sd materialSap sd material
Sap sd material
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven Development
 
Alhussain Zarban - CV (8) additional
Alhussain Zarban - CV (8) additionalAlhussain Zarban - CV (8) additional
Alhussain Zarban - CV (8) additional
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Council soft company-profile
Council soft company-profileCouncil soft company-profile
Council soft company-profile
 
SAP SD Complete Guide
SAP SD Complete GuideSAP SD Complete Guide
SAP SD Complete Guide
 
Samarendra_3+ Year_Software Testing
Samarendra_3+ Year_Software TestingSamarendra_3+ Year_Software Testing
Samarendra_3+ Year_Software Testing
 

Plus de Ravi Okade (8)

Preparing for AWS certified solutions architect associate exam (saa-c02)
Preparing for AWS certified solutions architect associate exam (saa-c02)Preparing for AWS certified solutions architect associate exam (saa-c02)
Preparing for AWS certified solutions architect associate exam (saa-c02)
 
Azure blockchain service
Azure blockchain serviceAzure blockchain service
Azure blockchain service
 
License plate detection using cloud api's
License plate detection using cloud api'sLicense plate detection using cloud api's
License plate detection using cloud api's
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor app
 
ZeroMq ZooKeeper and FlatBuffers
ZeroMq ZooKeeper and FlatBuffersZeroMq ZooKeeper and FlatBuffers
ZeroMq ZooKeeper and FlatBuffers
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In Memory
 
Dot Net Application Monitoring
Dot Net Application MonitoringDot Net Application Monitoring
Dot Net Application Monitoring
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Are you writing acceptance test yet?