SlideShare une entreprise Scribd logo
1  sur  52
Poison Centres
PCN Portal Milestones and Bacjklog
13 March 2018
Poison Centres
PCN Portal Milestones and Backlog
13 March 2018
Poison Centres
Service management workshop: Business overview
29 October 2018
To BDD or Not to BDD
QA or the Highway, 17 May 2022
Petros Plakogiannis
@Petros_2
Petros Plakogiannis
Test Team Leader
Test Automation Engineer @
13 years of software testing
@Petros_2
https://commons.wikimedia.org/wiki/File:Light-in-the-dark.jpg
@Petros_2
https://imgflip.com/i/5z8gii
What is BDD ?
@Petros_2
What is BDD
Behavior Driven Development
@Petros_2
BDD TDD
o Implemented by the Devs
o Implemented by the team
o Business language o Programming language
o End to end behavior of app o Individual functions/methods
VS
@Petros_2
BDD vs TDD
@Petros_2
A traditional Sprint
@Petros_2
Tools
@Petros_2
Gherkin Language
Gherkin is a bussines readable language
The five important keywords are
Given
When
Then
And
But
Reasons why we fail
@Petros_2
1 BDD as a testing tool
@Petros_2
QA Lead BDD
@Petros_2
Business users continued to send documents
2 Keep the features hidden
3 Misunderstanding, Bad Gherkin
@Petros_2
BDD examples
An example of a badly written scenario is this:
Scenario: As an existing chemical accessor add a chemical property to a formula.
Given I have an accessor user
And I input the username
And I input the password
And I press the login button
And can view the chemical addition page
And I have the permission to add a chemical property
And the corresponding formula can have more than two properties
When I press the button “add property”
And I input the chemical property
And I press the confirm button
And I press the button validate to validate the chemical property
And I press the button to confirm the addition to the formula
And I press the button to confirm the new formula
Then the chemical property added to the formula
@Petros_2
How to implement proper BDD
1 Train people
@Petros_2
Important Conversations
Having conversations
Is more important than
Capturing conversations
Is more important than
Automating conversations
Liz Keogh
@Petros_2
Living Documentation
a.k.a Executable specification
Living documentation is a reliable and authoritative source of
information on system functionality, which anyone can easily
access.
It is as reliable as the code, but much easier to read and
understand
Gojko Adzic
@Petros_2
Living Documentation
Tools that can help to make your living documentation accessible
SpecFlow+ LivingDoc renders feature files in Azure DevOps
with filtering and linking capabilities
Cucumber for Jira allows you to capture scenarios and visualize
them as living documentation
2 Ubiquitous language
@Petros_2
Ubiquitous language
Martin Fowler, the creator of Manifesto for Agile Software
Development, ThoughtWorks
“The practice of building up a common,
rigorous language between developers and
users”
@Petros_2
https://www.istockphoto.com
@Petros_2
Naming is valuable tool
Establish the common language and use it everywhere. Use it in the
specifications and use it in your design of your code
Jedi
Substance
AllSubstances
@Petros_2
Naming is valuable tool
IndustryUser
@Petros_2
Naming is valuable tool
IndustryUser.createSubstance (String data)
@Petros_2
Naming is valuable tool
IndustryUser.createSubstance (String data)
.updateSubstance(String data)
3 Pre-Flight Checks and meetings
@Petros_2
Pre-Flight Checks and Meetings
A Greater team comes together to discuss what the software will do.
Product Owners
Developers
Testers
@Petros_2
Pre-Flight Checks and Meetings
4 Write Correct Gherkin Syntax
@Petros_2
BDD examples
An example of a badly written scenario is this:
Scenario: As an existing chemical accessor add a chemical property to a formula.
Given I have an accessor user
And I input the username
And I input the password
And I press the login button
And can view the chemical addition page
And I have the permission to add a chemical property
And the corresponding formula can have more than two properties
When I press the button “add property”
And I input the chemical property
And I press the confirm button
And I press the button validate to validate the chemical property
And I press the button to confirm the addition to the formula
And I press the button to confirm the new formula
Then the chemical property added to the formula
@Petros_2
BDD examples
Here’s a better and clearer way to write the scenario:
Scenario: As an existing chemical accessor add a chemical property to a formula.
Given A user is authenticated with his accessor user
And can view the chemical addition page
And the user has the permission to add a chemical property
When the user add a property to the formula
Then the chemical property added successfully to the formula
@Petros_2
BDD examples
Here are some important points about scenarios and steps in Gherkin:
The statements must be written in order "Given-When-Then"
Neither should " Given-When-Then" be repeated per stage. To extend any of the
sentences, "And" is used.
As much as possible, do not use many steps for a single scenario
Write the sentences to be explanatory and brief
@Petros_2
BDD examples
Other Key Words to Describe the Scenarios
Background
Data Tables
Tags
@Petros_2
Background
Background:
Given the user has already accessed the new tool
And the user navigates to the page 'Risk Assessments'
And the user enters the following to the 'Assessments' table:
| Name | Assessment|
| Assessment | Rosin |
And the user navigates to New Scope wizard
@basicFlow @resetState
Scenario: Distinguish empty numeric properties that are outputs
Given the user clicks on the 'House scenario by amateur' link in the 'House uses' use table
…
@Petros_2
44
Data Tables
Data Tables are defined at the step level and not at the scenario level
@basicFlow @resetState
Scenario: Model Properties are displayed at Scenario level of a Complex Substance
Assessment
Given the user navigates to the chemical scenario
When the user clicks on the tab 'Conditions of Use'
Then the 'Conditions of Use' form is displayed with the following values:
| Name | Value | Unit |
| Daily use amount at site |10 | t.d-1 |
| Daily local widespread use amount |20 | t.d-1 |
| Annual use amount at site |30 | t.y-1 |
@Petros_2
Tags
The tags are annotations that serve to group and organize scenarios and even features
@CHRIII-1452
Feature: …
@SmokeTest @CHRIII-1452
Scenario: …
@RegressionTest
Scenario: …
5 BDD as a process
@Petros_2
Dev/ QA Start three Amigos meetings
@Petros_2
A fully Behavior-Driven Sprint
@Petros_2
What we gain from BDD
High visibility / transparency
Software development meets user needs
Strong collaboration
More confidence from the developers' side
Improve Quality of the product - Lower costs
@Petros_2
Take aways
We need a ubiquitous language
BDD is not an alternative to manual testing
BDD is about collaboration
BDD is not responsibility of testers
@Petros_2
https://learnenglishteens.britishcouncil.org/
Thank you!
petros-plakogiannis @Petros_2

Contenu connexe

Similaire à Petros Plakogiannis - To BDD or not to BDD

Poject documentation deepak
Poject documentation deepakPoject documentation deepak
Poject documentation deepak
chetankane
 
VidyaBhooshanMishra_CV
VidyaBhooshanMishra_CVVidyaBhooshanMishra_CV
VidyaBhooshanMishra_CV
Landis+Gyr
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
Vikas Sarin
 

Similaire à Petros Plakogiannis - To BDD or not to BDD (20)

SRC Writing for Thesis HCR by Ifterkhar Live_ Report 6
SRC Writing for Thesis HCR by Ifterkhar Live_ Report 6SRC Writing for Thesis HCR by Ifterkhar Live_ Report 6
SRC Writing for Thesis HCR by Ifterkhar Live_ Report 6
 
New GRIN-Global tools developed by CIP in 2020
New GRIN-Global tools developed by CIP in 2020New GRIN-Global tools developed by CIP in 2020
New GRIN-Global tools developed by CIP in 2020
 
Implementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag ManagerImplementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag Manager
 
The Role of GitOps in IT Strategy - June 2021 - Schlomo Schapiro
The Role of GitOps in IT Strategy - June 2021 - Schlomo SchapiroThe Role of GitOps in IT Strategy - June 2021 - Schlomo Schapiro
The Role of GitOps in IT Strategy - June 2021 - Schlomo Schapiro
 
Poject documentation deepak
Poject documentation deepakPoject documentation deepak
Poject documentation deepak
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 
Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications!					Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications!
 
Research software identification - Catherine Jones
Research software identification - Catherine JonesResearch software identification - Catherine Jones
Research software identification - Catherine Jones
 
VidyaBhooshanMishra_CV
VidyaBhooshanMishra_CVVidyaBhooshanMishra_CV
VidyaBhooshanMishra_CV
 
prc 8 (1).pdf
prc 8 (1).pdfprc 8 (1).pdf
prc 8 (1).pdf
 
Emerging PM Tools Webinar
Emerging PM Tools WebinarEmerging PM Tools Webinar
Emerging PM Tools Webinar
 
Major Project Report(Git Automation Script).pdf
Major Project Report(Git Automation Script).pdfMajor Project Report(Git Automation Script).pdf
Major Project Report(Git Automation Script).pdf
 
Writing Cucumber
Writing CucumberWriting Cucumber
Writing Cucumber
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july
 
Behavior-Driven Development (BDD) in context
Behavior-Driven Development (BDD) in contextBehavior-Driven Development (BDD) in context
Behavior-Driven Development (BDD) in context
 
CV_AmalMandal
CV_AmalMandalCV_AmalMandal
CV_AmalMandal
 
Kiran1.docx (1)
Kiran1.docx (1)Kiran1.docx (1)
Kiran1.docx (1)
 
testing.pdf
testing.pdftesting.pdf
testing.pdf
 
Requirement Types (Razvan Radulian, 2008)
Requirement Types (Razvan Radulian, 2008)Requirement Types (Razvan Radulian, 2008)
Requirement Types (Razvan Radulian, 2008)
 

Plus de QA or the Highway

Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
QA or the Highway
 

Plus de QA or the Highway (20)

KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Ravi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptxRavi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptx
 
Caleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptxCaleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptx
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
 
Thomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdfThomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdf
 
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdfJoe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
 
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdfSarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
 
Jeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdfJeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdf
 
Leandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdfLeandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdf
 
Rick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdfRick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdf
 
Robert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptxRobert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptx
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdf
 
Andrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptxAndrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptx
 
Melissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdfMelissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdf
 
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
 
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptxDesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
 
Damian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdfDamian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdf
 
Lee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdfLee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdf
 
Jordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptxJordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptx
 
Carlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptxCarlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptx
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Petros Plakogiannis - To BDD or not to BDD

Notes de l'éditeur

  1. you might just need a Ph.D. in techno-babble to make sense of the definitions you'll find online. So let me first attempt to simplify the definition: BDD is a product testing methodology based on what real (human) users might actually do. Practically, it is an extension of agile product development.
  2. The first thing is about Behaviour. It is not how you write your tests, is not about the tools you use. It is about thinking the behavior of the software that are you writing. The second word is the Driven, that means that you are driving your development using the Behaviour. It is like Testing driven development but we thinking how we want the software to behave for the customer. If you are starting writing Cucumber scenarios after you written software you are not driving development. And of course the final is the development but at the end of the day we want to involve our Business people.
  3. BDD and TDD may seem very similar since they are both testing strategies for a software application. In both cases, we write the test before writing the code to make the test pass. BDD involves product managers, developers, and test engineers who collaborate to come up with concrete examples of desirable functionality. TDD can be done by a solo developer The TDD test asserts the result of a specific method, FOR A FEATURE (Writing in Developers languague) BDD test is concerned about the result of the higher level scenario. (Writing in Business language) (Unit Tests are Written before the business logic. For a feature)
  4. First, we need to describe the desired behavior in a feature file then we have to write step definitions (Step definitions the glue between features written in Gherkin and the actual tests implementation.) and then the test fails. After some code refactoring, the test passes The code has to pass the test scripts defined in BDD. If it does not happen, code refactoring will be need
  5. So we used to follow the “traditional” agile sprint one that is not yet behavior driven. Product owners write user stories, developers implement the solutions, and testers test the deliverables.
  6. So we used cucumber that you can write feature files using Gherkin language that is close to the natural language. The five important keywords are. We will see later some examples. Let me at this point to tell you a funny story why Cucumber is called cucumber. So The story goes that Aslak that created Cucumber, he was in home and asked his wife how should calls his new software, and he was eating a cucumber sandwich and she said cucumber. So Unfortunately, is called with this funny name Anyway, So we chose the tools and we applied the BDD.
  7. When you see a feature file you should be able to describe what is actually validating from the end-user perspective so scenarios like this are just test cases and they do not represent requirements. It’s better to avoid writing scenarios in this way because it makes them very long, with many unnecessary details.
  8. Training. Train business people and engineers on how to communicate better. What is BDD. That is a process and not just a tool that you can download. What are the advantages, do some presentations, have conversations. If you can’t have conversations, stop. You can’t do BDD.
  9. I am saying this loud and clear in Bold, because BDD is not to have a better test automation. You WILL get test-automation but is a SIDE EFFECT. BDD Is about collaboration and Communication. Η Λιζ Keogh : Agile coach Thoughtworks kai htane kai Lead developer sto JBehanve
  10. Publish them somewhere that everyone on the team will be able to read them as documentation. Something that is called Living Documentation. It is living, because it is generated by the automated test suite, each time the application is built. So it is always up-to-date. Γκόικο Άντζιτς
  11. Try to follow an implementation that the living documentation is available linked from the project dashboard, so you just open it in your browser and check out the scenarios that you want.
  12. BDD encourages simple languages to be used across teams, known as ubiquitous languages. The simple and easy to use language should be used in the way the tests themselves are written, so that in theory, a business person can read a test and understand what it is testing. Tests are often written from the customer’s point of view; the focus is on the customers and the users who are interacting with the product
  13. Find with your business team a Ubiquitous language. Develop a domain specific language that we can all understand. Develop a glossary of all business terms with definitions. Have open discussions, analysis of existing documents etc. so you can come up with better common language. Not a new concept (this book in 90’s)
  14. This domain language is the language of the business. That doesn’t mean web servers, databases, APIs, HTML, CSS or Javascript. It is the language of the business - so in our case: Substances,Chemical Safety report, legislations ec We can think of Chemical safety report for example as an object with data like safety report number, risk assessments, substance name, date created and so on Using a common language is very powerful. The code is clear and everyone can understand what is about.
  15. For example, the name in our key class was used to be: Jedi. Any idea what is this doing? Mean either. It is a cool name. I am fun of star wars but I don’t know what is doing. It tells you nothing at all. Since I am writing software about chemicals. So Substances it makes some sense. Or AllSubstances. Again very sensible, very useful.
  16. For example, the name in our key class was used to be: Jedi. Any idea what is this doing? Mean either. It is a cool name. I am fun of star wars but I don’t know what is doing. It tells you nothing at all. Since I am writing software about chemicals. So Substances it makes some sense. Or AllSubstances. Again very sensible, very useful.
  17. For example, the name in our key class was used to be: Jedi. Any idea what is this doing? Mean either. It is a cool name. I am fun of star wars but I don’t know what is doing. It tells you nothing at all. Since I am writing software about chemicals. So Substances it makes some sense. Or AllSubstances. Again very sensible, very useful.
  18. For example, the name in our key class was used to be: Jedi. Any idea what is this doing? Mean either. It is a cool name. I am fun of star wars but I don’t know what is doing. It tells you nothing at all. Since I am writing software about chemicals. So Substances it makes some sense. Or AllSubstances. Again very sensible, very useful.
  19. For me this is the most important part of BDD. Pre-Flight Checks meetings. The collaboration between development, test and product owner. To have conversations with your team. Instead of one person, working alone to create given/when/then, a greater team comes together to discuss what the software will do.
  20. This discussion creates a shared understanding. All roles in development can contribute to the work.
  21. So in BDD business persons, developers and testers come up with examples of how the software should behave, and write them down as Cucumber Features and Scenarios.
  22. Analysis team did not follow the patterns to write correct Gherkin syntax 
  23. It’s better to avoid writing scenarios in this way because it makes them very long, with many unnecessary details. Its harder to read them and understand them and maintain them.
  24. Remember behavior scenarios are more than tests – they also represent requirements and acceptance criteria. The First Person Dan North (considered the creator of BDD), as we found in a reference in Stack Overflow, recommends the use of the first person, and in fact it’s what he uses to write his scenarios in his article, "Introducing BDD.“ The Third Person The defenders of this position argue that the use of the first person makes the scenario reader lose reference to the role or the user that is being talked about. If I write in a step "I delete an article from the system," who is the one that is doing it? An administrator, a particular user? A set of roles? In some way, the use of the third person diminishes the risk or the difficulty of the reader making erroneous assumptions about who is the stakeholder(s) involved. Conclusion There is no general rule about the point of view to use to write the scenarios.
  25. Given" represents a precondition, "When" an action and "Then" a result or consequence of the action 3) Τhe idea is that a user who does not know the functionality should be able to understand it by reading the scenario. The less you have to read to understand it, the better.
  26. If in all the scenarios of the same feature, some preconditions are met, it is much more practical to use a Background than to write the same thing several times. This serves as a series of steps that will be executed before all the scenarios of the feature. Let’s see an example:
  27. Very useful. Data Tables serve to pass input data to a single step within the scenario.
  28. These are written with the @ symbol followed by a significant text, examples:
  29. It’s time to start shifting left. Schedule pre-flight checks meetings with analysts and devs to proactively discuss user story expectations. Analyst and dev folks are convinced of BDD’s benefits, encourage them to participate in writing Gherkin.
  30. Keep going. When they get comfortable, encourage product owners to write acceptance criteria in Gherkin when they write user stories, and hold pre-flight checks meetings before sprint planning as part of refining. Convince them that for them to help write Gherkin scenarios is a process efficiency for the whole team.
  31. So when we applied properly the BDD we had some results: With BDD, all the involved parties have a strong understanding of the project  By using a common language, everyone gets strong visibility By focusing on the business’s needs, you get satisfied users Developers are much more confident that they won’t break the code By improving the quality of the code, you are reducing costs of maintenance and minimizing the project’s risks.
  32. These are my main takeaways and hopefully you will find then useful when you decide to use BDD methodology.
  33. Hence, paraphrasing the famous opening phrase of William Shakespeare’s play Hamlet “To BDD or not to BBD” I will say there is not a correct answer. In some cases adopting BDD might be the best solution but you have to apply it properly. Just remember there’s more than one way to create good software! Thank you!