SlideShare a Scribd company logo
www.atsistemas.com
From user stories to Automated Acceptance Tests with BDD
Eduardo Riol
I’m Eduardo Riol, QA & Testing Community Technical Leader in
atSistemas, where we are enthusiasts of Software Quality Assurance,
Tests Automation and Testing best practices.
I started as developer in Java and .NET environments more than a decade
ago, but I’ve been involved the last eight years in Software Quality, both
products and development processes oriented.
Currently my interests are focused in the integration of QA activities in
Agile and DevOps environments, technical debt control and BDD.
Lately I research about other topics like Security and Blockchain.
twitter.com/eduriol
github.com/eduriol
linkedin.com/in/eduriol
Who am I?
3
We are a dependable partner, with a long trajectory and a solid
future in the industry
of revenue in 2017
54,5 M€ estimated for
2018
Present in every
industry
Spanish capital
Presence in Madrid,
Barcelona, Cádiz,
Zaragoza, A Coruña,
Mallorca and Huelva
International vocation
And currently IT referent in Innovation
Expert Centers and cutting-edge
Technological Communities,
leaders in Digital Transformation
IT professionals
of proved Technical Solvency
growth in international
interannual billing at 2017
closure
atSistemas
45,6 M€
100%
1994Founded in
R&D
1000
16,5%
Houston, we have a problem!
“This is not what we asked for” Does that ring a bell?
Houston, we have a problem!
Chine
se
whisp
ers The Gossips, Norman Rockwell, 1948
“This is not what we asked for” Does that ring a bell?
We focused on developing software CORRECTLY…
Functional
testing Unit testing
Performance
testing
Integration
testing
Static analysis
Ethical
hacking
Process audits
UAT
… but do we develop the CORRECT software?
Features Used
The Standish Group estimate of features used in custom application development, 2014
Hardly Ever
50%
Often
20%
Infrequently
30%
Features Used
The Standish Group estimate of features used in custom application development, 2014
Hardly
Ever
50%
Often
20%
Infrequently
30%
… but do we develop the CORRECT software?
We don’t trust releases
Most of the time we don’t have an
acceptance tests suite robust and
complete enough to be trusted
We don’t trust releases
Lack of documentation
Individuals and interactions OVER processes and tools
Working software OVER comprehensive documentation
Customer collaboration OVER contract negotiation
Responding to change OVER following a plan
We are
uncovering better
ways of
developing
software by doing
it and helping
others do it.
Through this work
we have come to
value:
That is, while
there is value
in the items on
the right, we
value the items
on the left
more.
The Agile manifestoThe Agile manifesto
How often have you finished a project in which technical
documentation is up-to-date with what software really does?
Individuals and interactions OVER processes and tools
Working software OVER comprehensive documentation
Customer collaboration OVER contract negotiation
Responding to change OVER following a plan
We are uncovering
better ways of
developing
software by doing
it and helping
others do it.
Through this work
we have come to
value:
That is, while
there is value
in the items on
the right, we
value the items
on the left
more.
The Agile manifestoThe Agile manifesto
Lack of documentation
And collaboration within the team?
We have
Quality issues
Ain’t my problem,
Software Quality is
what testers should
care about, isn’t it?
Devs? I think those are the
guys in the 4th floor or
something
Dev people keep returning
unresolved bugs
And collaboration within the team?
We have
Quality issues
Ain’t my problem,
Software Quality is
what testers should
care about, isn’t it?
This problem starts from here
• Analysis
• Development
• Testing
• Operations
As separated phases, estimated
and planned from the beginning of
the project
This problem starts from here
As separated phases, estimated
and planned from the beginning of
the project
• Analysis
• Development
• Testing
• Operations
BDD: How Devs and Business collaborate
BDD is a collaboration model between Business users and
Development team…
… consisting of establishing conversations based in concrete
examples of the application use, with the objective of reducing
misconceptions and assumptions…
… discovering during the process the features that truly provide
value
• Examples describing a new feature are
translated to a simple and common language,
without ambiguities (for example Gherkin)
• Development team transforms these examples
to a series of executable specifications as
automated tests
• A software feature will be completed whenever
every specification executes correctly
BD
D
TDD
Write a failing test
N cycles
BDD: How Devs and Business collaborate
Then, what is (and what not) BDD?
• Writing requirements
in Gherkin language
• Automating tests with
Cucumber
• Documenting
functionalities after
programming them
• A collaboration model
• A discovering process
• Understanding
Business needs
• Describing software
with examples
What it is What it’s not
Three amigos
Business QA
Dev
Three amigos
1. PO talks with
Business about its
needs
2. The PO, a Dev and
a Tester meet to
elaborate scenarios
jointly
4. The scenarios
guide the dev and act
as automated tests
3. The tester
implements the
scenarios as
acceptance tests
5. Automated tests
provide feedback
about progress and
document the
application
A collaboration scenario
We want our application to
require a password with at least 8
characters, a number and a
capital letter
Don’t you mean you want
the application to require a
strong password?
Password strenght, xkcd, Randall Munroe
Password Security Accepta
ble?
secret Weak No
password Weak No
password1 Weak No
aBcdEfg1 Weak No
qwertY12 Weak No
dJeZDip1 Medium Yes
SeagullHedgehog Strong Yes
SeagullHedgehogC
atapult
Very
strong
Yes
A collaboration scenario
We want our application to
require a password with at least
8 characters, a number and a
capital letter
Don’t you mean you
want the application to
require a strong
password?
Discovering our Business
“In software development, ignorance is the constraint. You know a lot more about the
best way to build a particular solution after you’ve finished building it, but by then it’s
too late to take advantage of your knowledge.”
John Ferguson Smart, BDD in action, 2015
Implementing BDD: Describing scenarios
SCENARIO
Sending
Contact Form
Given John Doe enters contact form
And he fills the fields with his data and the
message
And accept legal clause
When he sends the query
Then the confirmation message is received
Given: Defines the context in which the
scenario is executed. In this step the starting
point for the example is established.
When: It’s the action that triggers the
example. It consists of an interaction with the
application, usually by a user, whose behavior
we want to validate.
Then: In this step the result expected by the
Business is defined, meaning the condition
that must be fulfilled for the scenario to be
considered correctly executed.
Implementing BDD: Automating scenarios
Scenario: Transfer money to a Savings account
Given my Checking account has a balance of 1000.00
And my Savings account has a balance of 2000.00
When I transfer 500.00 from my Checking account to my Savings account
Then I should have 500.00 in my Checking account
And I should have 2500.00 in my Savings account
Scenario: Transfer money to a Savings account
Given my Checking account has a balance of 1000.00
And my Savings account has a balance of 2000.00
When I transfer 500.00 from my Checking account to my Savings account
Then I should have 500.00 in my Checking account
And I should have 2500.00 in my Savings account
@Given(“^my (.*) account has a balance of (d+)$")
public void setupInitialAccount(AccountType accountType,
double amount) {
// Setup account
}
@When(“^I transfer (d+) from my (.*) account to my (.*) account$")
public void transferAmountBetweenAccounts(double amount, AccountType source, AccountType destination) {
// Perform action
}
@Then(“^I should have (d+) in my (.*) account$")
public void checkAccountAmount(double amount, AccountType accountType) {
// Assert amount
}
Implementing BDD: Automating scenarios
Exploratory
Testing
BDD levels: The Testing pyramid
UI
API / Services
Unit
Prevent errors / Provide value
UI (manual & automatic)
API / Services
Unit
Detect errors / Certify releases
Exploratory
Testing
BDD levels: The Testing pyramid
UI
API / Services
Unit
Prevent errors / Provide value
BDD in the software building process
Scenarios execution should be part of the software integration,
building and deployment process.
Each scenario should be able to be executed separately, without any
concrete order. There should be no dependency between scenarios.
Scenarios are a code asset to be maintained under version control
systems.
The software building and deployment process additionally becomes a
process for building and deploying documentation and reports.
Reports: feature readiness
A feature is considered
ready to be deployed in
production whenever its
scenarios execute
correctly.
Feature readiness
Your business does not care whether your tests pass or not. What they want to know is
if the functionality is ready to be deployed in production.
Reports: feature coverage
Feature coverage shows
the % of features with
every defined scenario
executing correctly.
Feature coverage
Warning!, BDD is not a silver bullet
Business implication: We need the stakeholders involved
since the beginning of the project.
BDD is thought for Agile: it is a collaboration model to
fostering an iterative discovering of the requirements.
BDD doesn’t like silos: if the organization works in
isolated silos and collaboration doesn’t flow, the
progressive clarification of goals disappears.
Risk of high cost in test maintenance: experience and
knowledge are required in order to design maintainable
functional specifications and implement them correctly.
Technologies for BDD
Nuestro catálogo de servicos
QA de GOBIERNO• Testing funcional
• Pruebas de Sistema
• Pruebas de Seguridad
• Pruebas de carga/rendimiento
• Análisis y control de la deuda técnica
• Definición y mejora de los procesos de
gobierno, ingeniería y calidad para la
Transformación Digital
• Formación en buenas prácticas de
desarrollo
• Implantación de una Oficina de Calidad
AGILE QA
• Apoyo metodológico
• Servicios de automatización en el
marco de un proceso de Entrega
Continua
• Automatización de pruebas
QA OPERATIVO
www.atsistemas.com
902 888 902
GRACIAS
Madrid
Oficinas Centrales:
C/Valle de Alcudia 3, Ed. 2
28232 - Las Rozas - Madrid
Selección y Recursos Humanos:
C/Acanto 22, Plta. 3
28045 - Madrid
C/Retama 7, Plta. 1
28045 - Madrid
Barcelona
Plaça de Catalunya 21, Plta. 2
08002 - Barcelona
Cádiz
Edificio Jerez Parque Empresarial, C/ del Desarrollo 2, Plta. 1
11047 - Jerez de la Frontera - Cádiz
Zaragoza
Centro Tecnológico TIC XXI, C/Bari 57, Plataforma Logística (PLA-ZA)
50197 - Zaragoza
A Coruña
Edificio Mans Polígono de Pocomaco, Parcela D22
15190 - A Coruña
Palma de Mallorca
Regus Palma Polígono de Son Castello, C/ Gremi de Sabaters 21, Plta. 2
07009 - Palma de Mallorca
Huelva
Parque Científico Tecnológico de Huelva, Edificio PCTH2000
21 110 - Aljaraque - Huelva

More Related Content

PDF
Expo qa from user stories to automated acceptance tests with bdd
PDF
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
PDF
How to successfully execute fixed price agile projects
PDF
BDD in Action - Devoxx 2014
PDF
GBKSOFT App Development
PDF
BDD: The unit test of the product owner
PDF
India’s Top Software Product Development Company
PDF
Successfully Implementing BDD in an Agile World
Expo qa from user stories to automated acceptance tests with bdd
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
How to successfully execute fixed price agile projects
BDD in Action - Devoxx 2014
GBKSOFT App Development
BDD: The unit test of the product owner
India’s Top Software Product Development Company
Successfully Implementing BDD in an Agile World

What's hot (16)

PDF
BDD: There's more to it than you think
PDF
BDD in Action: Building Software Right and Building the Right Software
PDF
BDD in Action - building software that matters
PPTX
Operational Costs of Technical Debt
PPTX
Behavior driven development (bdd)
PDF
Hire Golang App Developers in India
PDF
TDD and BDD in Java 8 - what's in it for me?
PDF
BDD Anti-patterns
PDF
Meeting Strict Documentation Requirements in Agile
PPTX
Behaviour Driven Development (BDD) - Closing the Loop on a Great Fiori UX
PPTX
Scrum + Behavior Driven Development (BDD) - Colombo
PDF
An introduction to Behavior-Driven Development (BDD)
PDF
BDD in Action - Automated Web Testing with WebDriver and Serenity
PDF
It's Testing, Jim, but not as we know it - BDD for Testers
PDF
CodeIT company presentation
PPTX
3D Engineering Services
BDD: There's more to it than you think
BDD in Action: Building Software Right and Building the Right Software
BDD in Action - building software that matters
Operational Costs of Technical Debt
Behavior driven development (bdd)
Hire Golang App Developers in India
TDD and BDD in Java 8 - what's in it for me?
BDD Anti-patterns
Meeting Strict Documentation Requirements in Agile
Behaviour Driven Development (BDD) - Closing the Loop on a Great Fiori UX
Scrum + Behavior Driven Development (BDD) - Colombo
An introduction to Behavior-Driven Development (BDD)
BDD in Action - Automated Web Testing with WebDriver and Serenity
It's Testing, Jim, but not as we know it - BDD for Testers
CodeIT company presentation
3D Engineering Services
Ad

Similar to Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol (20)

PPTX
Gateway to Agile: XP and BDD
PPTX
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
DOC
5YearsOfExperience_Shivdeep_Salesforce_Developer
PPTX
Behaviour driven development aka bdd
PDF
Cloud Developer Resume Jhon-Arzu-Gil
PDF
Specification-by-Example: A Cucumber Implementation
PPTX
BVDs and Your Data - Combined to Drive Success
PDF
2015 in tothebox-introtddbdd
PDF
Intro to TDD & BDD
PDF
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
PDF
www-valuecoders-com-blog-industry-news-why-should-you-hire-developers-from-va...
PPTX
BDD Selenium for Agile Teams - User Stories
PPTX
Technical Debt.pptx
PPT
Designingapplswithnet
PPTX
Our Experience in Banking and Financial Services
DOC
Arx mindbusinessportfolio
DOC
Narayanan Doraiswamy Resume
PDF
4 Phases followed by the Android Application Development Company.pdf
PPTX
Bdd with Cucumber and Mocha
PDF
Projekt202 2014 Overview
Gateway to Agile: XP and BDD
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
5YearsOfExperience_Shivdeep_Salesforce_Developer
Behaviour driven development aka bdd
Cloud Developer Resume Jhon-Arzu-Gil
Specification-by-Example: A Cucumber Implementation
BVDs and Your Data - Combined to Drive Success
2015 in tothebox-introtddbdd
Intro to TDD & BDD
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
www-valuecoders-com-blog-industry-news-why-should-you-hire-developers-from-va...
BDD Selenium for Agile Teams - User Stories
Technical Debt.pptx
Designingapplswithnet
Our Experience in Banking and Financial Services
Arx mindbusinessportfolio
Narayanan Doraiswamy Resume
4 Phases followed by the Android Application Development Company.pdf
Bdd with Cucumber and Mocha
Projekt202 2014 Overview
Ad

More from atSistemas (20)

PPTX
Agile itsm con atlassian
PPTX
Bizz Chat metamorfosis digital
PPTX
Webinar 5 net5-2021
PPTX
Webinar Speed Up Academy: Acelera la incorporación de talento.
PPTX
Webinar: Descubre los diferentes servicios Cloud Native en Azure
PDF
El futuro del trabajo en equipo
PPTX
La tecnología al servicio de la agilidad empresarial
PPTX
Transformación Agile
PPTX
Transformación cultural
PDF
Technical considerations for Blockchain networks with AWS
PDF
Blockchain Spain II Edición - Ángel Miguel Martínez
PDF
Blockchain Spain - Néstor Gándara
PDF
Blockchain Spain - Juan Luis Gozalo
PDF
Blockchain Spain - Ramón Abruña
PDF
Blockchain Spain - Santiago Chamat
PDF
Blockchain Spain - Antonio Gómez
PDF
Blockchain Spain - Miguel Ángel Rojas
PDF
Blockchain Spain - Andrés Sánchez
PDF
Blockchain Spain II Edición - Autoridad Portuaria de Cartagena, Ilboc, Repsol
PDF
Blockchain Spain II Edición - Juan Manuel Martínez
Agile itsm con atlassian
Bizz Chat metamorfosis digital
Webinar 5 net5-2021
Webinar Speed Up Academy: Acelera la incorporación de talento.
Webinar: Descubre los diferentes servicios Cloud Native en Azure
El futuro del trabajo en equipo
La tecnología al servicio de la agilidad empresarial
Transformación Agile
Transformación cultural
Technical considerations for Blockchain networks with AWS
Blockchain Spain II Edición - Ángel Miguel Martínez
Blockchain Spain - Néstor Gándara
Blockchain Spain - Juan Luis Gozalo
Blockchain Spain - Ramón Abruña
Blockchain Spain - Santiago Chamat
Blockchain Spain - Antonio Gómez
Blockchain Spain - Miguel Ángel Rojas
Blockchain Spain - Andrés Sánchez
Blockchain Spain II Edición - Autoridad Portuaria de Cartagena, Ilboc, Repsol
Blockchain Spain II Edición - Juan Manuel Martínez

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Modernizing your data center with Dell and AMD
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Modernizing your data center with Dell and AMD
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology

Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol

  • 1. www.atsistemas.com From user stories to Automated Acceptance Tests with BDD Eduardo Riol
  • 2. I’m Eduardo Riol, QA & Testing Community Technical Leader in atSistemas, where we are enthusiasts of Software Quality Assurance, Tests Automation and Testing best practices. I started as developer in Java and .NET environments more than a decade ago, but I’ve been involved the last eight years in Software Quality, both products and development processes oriented. Currently my interests are focused in the integration of QA activities in Agile and DevOps environments, technical debt control and BDD. Lately I research about other topics like Security and Blockchain. twitter.com/eduriol github.com/eduriol linkedin.com/in/eduriol Who am I?
  • 3. 3 We are a dependable partner, with a long trajectory and a solid future in the industry of revenue in 2017 54,5 M€ estimated for 2018 Present in every industry Spanish capital Presence in Madrid, Barcelona, Cádiz, Zaragoza, A Coruña, Mallorca and Huelva International vocation And currently IT referent in Innovation Expert Centers and cutting-edge Technological Communities, leaders in Digital Transformation IT professionals of proved Technical Solvency growth in international interannual billing at 2017 closure atSistemas 45,6 M€ 100% 1994Founded in R&D 1000 16,5%
  • 4. Houston, we have a problem! “This is not what we asked for” Does that ring a bell?
  • 5. Houston, we have a problem! Chine se whisp ers The Gossips, Norman Rockwell, 1948 “This is not what we asked for” Does that ring a bell?
  • 6. We focused on developing software CORRECTLY… Functional testing Unit testing Performance testing Integration testing Static analysis Ethical hacking Process audits UAT
  • 7. … but do we develop the CORRECT software? Features Used The Standish Group estimate of features used in custom application development, 2014 Hardly Ever 50% Often 20% Infrequently 30%
  • 8. Features Used The Standish Group estimate of features used in custom application development, 2014 Hardly Ever 50% Often 20% Infrequently 30% … but do we develop the CORRECT software?
  • 9. We don’t trust releases
  • 10. Most of the time we don’t have an acceptance tests suite robust and complete enough to be trusted We don’t trust releases
  • 11. Lack of documentation Individuals and interactions OVER processes and tools Working software OVER comprehensive documentation Customer collaboration OVER contract negotiation Responding to change OVER following a plan We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: That is, while there is value in the items on the right, we value the items on the left more. The Agile manifestoThe Agile manifesto
  • 12. How often have you finished a project in which technical documentation is up-to-date with what software really does? Individuals and interactions OVER processes and tools Working software OVER comprehensive documentation Customer collaboration OVER contract negotiation Responding to change OVER following a plan We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: That is, while there is value in the items on the right, we value the items on the left more. The Agile manifestoThe Agile manifesto Lack of documentation
  • 13. And collaboration within the team? We have Quality issues Ain’t my problem, Software Quality is what testers should care about, isn’t it?
  • 14. Devs? I think those are the guys in the 4th floor or something Dev people keep returning unresolved bugs And collaboration within the team? We have Quality issues Ain’t my problem, Software Quality is what testers should care about, isn’t it?
  • 15. This problem starts from here • Analysis • Development • Testing • Operations As separated phases, estimated and planned from the beginning of the project
  • 16. This problem starts from here As separated phases, estimated and planned from the beginning of the project • Analysis • Development • Testing • Operations
  • 17. BDD: How Devs and Business collaborate BDD is a collaboration model between Business users and Development team… … consisting of establishing conversations based in concrete examples of the application use, with the objective of reducing misconceptions and assumptions… … discovering during the process the features that truly provide value
  • 18. • Examples describing a new feature are translated to a simple and common language, without ambiguities (for example Gherkin) • Development team transforms these examples to a series of executable specifications as automated tests • A software feature will be completed whenever every specification executes correctly BD D TDD Write a failing test N cycles BDD: How Devs and Business collaborate
  • 19. Then, what is (and what not) BDD? • Writing requirements in Gherkin language • Automating tests with Cucumber • Documenting functionalities after programming them • A collaboration model • A discovering process • Understanding Business needs • Describing software with examples What it is What it’s not
  • 21. Three amigos 1. PO talks with Business about its needs 2. The PO, a Dev and a Tester meet to elaborate scenarios jointly 4. The scenarios guide the dev and act as automated tests 3. The tester implements the scenarios as acceptance tests 5. Automated tests provide feedback about progress and document the application
  • 22. A collaboration scenario We want our application to require a password with at least 8 characters, a number and a capital letter Don’t you mean you want the application to require a strong password?
  • 23. Password strenght, xkcd, Randall Munroe Password Security Accepta ble? secret Weak No password Weak No password1 Weak No aBcdEfg1 Weak No qwertY12 Weak No dJeZDip1 Medium Yes SeagullHedgehog Strong Yes SeagullHedgehogC atapult Very strong Yes A collaboration scenario We want our application to require a password with at least 8 characters, a number and a capital letter Don’t you mean you want the application to require a strong password?
  • 24. Discovering our Business “In software development, ignorance is the constraint. You know a lot more about the best way to build a particular solution after you’ve finished building it, but by then it’s too late to take advantage of your knowledge.” John Ferguson Smart, BDD in action, 2015
  • 25. Implementing BDD: Describing scenarios SCENARIO Sending Contact Form Given John Doe enters contact form And he fills the fields with his data and the message And accept legal clause When he sends the query Then the confirmation message is received Given: Defines the context in which the scenario is executed. In this step the starting point for the example is established. When: It’s the action that triggers the example. It consists of an interaction with the application, usually by a user, whose behavior we want to validate. Then: In this step the result expected by the Business is defined, meaning the condition that must be fulfilled for the scenario to be considered correctly executed.
  • 26. Implementing BDD: Automating scenarios Scenario: Transfer money to a Savings account Given my Checking account has a balance of 1000.00 And my Savings account has a balance of 2000.00 When I transfer 500.00 from my Checking account to my Savings account Then I should have 500.00 in my Checking account And I should have 2500.00 in my Savings account
  • 27. Scenario: Transfer money to a Savings account Given my Checking account has a balance of 1000.00 And my Savings account has a balance of 2000.00 When I transfer 500.00 from my Checking account to my Savings account Then I should have 500.00 in my Checking account And I should have 2500.00 in my Savings account @Given(“^my (.*) account has a balance of (d+)$") public void setupInitialAccount(AccountType accountType, double amount) { // Setup account } @When(“^I transfer (d+) from my (.*) account to my (.*) account$") public void transferAmountBetweenAccounts(double amount, AccountType source, AccountType destination) { // Perform action } @Then(“^I should have (d+) in my (.*) account$") public void checkAccountAmount(double amount, AccountType accountType) { // Assert amount } Implementing BDD: Automating scenarios
  • 28. Exploratory Testing BDD levels: The Testing pyramid UI API / Services Unit Prevent errors / Provide value
  • 29. UI (manual & automatic) API / Services Unit Detect errors / Certify releases Exploratory Testing BDD levels: The Testing pyramid UI API / Services Unit Prevent errors / Provide value
  • 30. BDD in the software building process Scenarios execution should be part of the software integration, building and deployment process. Each scenario should be able to be executed separately, without any concrete order. There should be no dependency between scenarios. Scenarios are a code asset to be maintained under version control systems. The software building and deployment process additionally becomes a process for building and deploying documentation and reports.
  • 31. Reports: feature readiness A feature is considered ready to be deployed in production whenever its scenarios execute correctly. Feature readiness Your business does not care whether your tests pass or not. What they want to know is if the functionality is ready to be deployed in production.
  • 32. Reports: feature coverage Feature coverage shows the % of features with every defined scenario executing correctly. Feature coverage
  • 33. Warning!, BDD is not a silver bullet Business implication: We need the stakeholders involved since the beginning of the project. BDD is thought for Agile: it is a collaboration model to fostering an iterative discovering of the requirements. BDD doesn’t like silos: if the organization works in isolated silos and collaboration doesn’t flow, the progressive clarification of goals disappears. Risk of high cost in test maintenance: experience and knowledge are required in order to design maintainable functional specifications and implement them correctly.
  • 35. Nuestro catálogo de servicos QA de GOBIERNO• Testing funcional • Pruebas de Sistema • Pruebas de Seguridad • Pruebas de carga/rendimiento • Análisis y control de la deuda técnica • Definición y mejora de los procesos de gobierno, ingeniería y calidad para la Transformación Digital • Formación en buenas prácticas de desarrollo • Implantación de una Oficina de Calidad AGILE QA • Apoyo metodológico • Servicios de automatización en el marco de un proceso de Entrega Continua • Automatización de pruebas QA OPERATIVO
  • 36. www.atsistemas.com 902 888 902 GRACIAS Madrid Oficinas Centrales: C/Valle de Alcudia 3, Ed. 2 28232 - Las Rozas - Madrid Selección y Recursos Humanos: C/Acanto 22, Plta. 3 28045 - Madrid C/Retama 7, Plta. 1 28045 - Madrid Barcelona Plaça de Catalunya 21, Plta. 2 08002 - Barcelona Cádiz Edificio Jerez Parque Empresarial, C/ del Desarrollo 2, Plta. 1 11047 - Jerez de la Frontera - Cádiz Zaragoza Centro Tecnológico TIC XXI, C/Bari 57, Plataforma Logística (PLA-ZA) 50197 - Zaragoza A Coruña Edificio Mans Polígono de Pocomaco, Parcela D22 15190 - A Coruña Palma de Mallorca Regus Palma Polígono de Son Castello, C/ Gremi de Sabaters 21, Plta. 2 07009 - Palma de Mallorca Huelva Parque Científico Tecnológico de Huelva, Edificio PCTH2000 21 110 - Aljaraque - Huelva