SlideShare una empresa de Scribd logo
1 de 26
Writing software that matters


          Temesgen B Meheret (Teme)
               Senior Software Engineer @ Videology
                           Email: teme@videologygroup.com
   Background
   DDs
   Why do Projects Fail?
   Writing Software that matters
   TDD’s promise and it’s shortcomings
   BDD’s evolution
   BDD – Second generation agile methodology
   Enough Talk, now Code!
   Summary & Questions

                                       Temesgen B Meheret
                       Senior Software Engineer @Videology
   My name is Temesgen but you can call me
    “Teme”
   Software Engineer and team lead @Videology
   Ex-Software Engineer @LCG
   Plays Ping-Pong
   Why am I here & not @the Fedexfield for the
    USA-Brazil soccer match?




                           Writing Software that matters
   How many DDs are you aware of?
    ◦ DDD, ATDD, TDD, RDD, MDD…
   How many DD belts do you need before to be
    a great developer? 
   Driven – Keeping the right order
    ◦ HAPPY WIFE – HAPPY LIFE
   Architecture is Opinion. There are no
    absolutes. It is really up to us to evaluate and
    take what applies to our situation.
    ◦ E.g. Aratkilo building architecture


                                  Writing Software that Matters
Adaptation
7
6
5
4
3                                                                                    Adaptation
2
1
0

    0   1   2   3   4   5      6      7      8      9      10 11 12
                        Discussion: Selective Unit Testing – Costs and Benefits by Steven
                        Sanderson
                        Where is our team on this curve for BDD?
                                                 Writing Software that Matters
   What are the top 3 things that you believe contribute to a
    failure of a project?
   Have you ever practiced TDD in your projects? If so,
    ◦ Where do you start testing?
    ◦ What did you test?
    ◦ How much did you rely on your tests (trust) during
      refactoring?
    ◦ How effective were your test in terms of detecting bugs?
    ◦ What did you think was the main intent for writing unit
      tests?




                                    Writing Software that Matters
   Delivering Late or Over Budget
    ◦ Poor planning, estimation
    ◦ E.g. Deriving requirements from a running application – sheep’s
      stomach layers
   Delivering the wrong thing
    ◦ Building the product right but not the right product
    ◦ e.g. Projects shelved after many months of development and investment
   Unstable in Production
    ◦ E.g. The morning after Deployment hell
   Costly to maintain
    ◦ Code Quality

   What do you think about asking developers during
    interviews
    “How many failed projects have you been part of and what
    do you think was the cause?”


                                           Writing Software that matters
Discussion points: Top-Down vs. Bottom-up, Civil-Engineering projects vs. Software projects
Practical example: LOE flowing down from Solutions Team, Architecture reviews




                                                                                Writing Software that Matters
Software development is all about knowing and delivering WHAT
MATTERS most to the business

How do you KNOW WHAT MATTERS?
Through effective communication!

•    Tangible Business Value
•    Delivered on-time, incrementally
•    Easy to deploy and manage
•    Robust in Prod
•    Easy to understand and communicate


    In order to achieve this we need to be adaptive in our planning, requirements
    and design. Regression tests also play a big role to be able to embrace change
    without fear.


                                        Discussion: Nothing replaces People.
                                              Writing software that matters
◦ Clear Communication between Stakeholders
  Discussion: Stake holders and their world point of view
◦ Constant re-Prioritization owned by the product-
  owner
◦ Immediate feedback at every level
◦ Flexibility – Adapting to Feedback
  E.g. client’s needs changed, technology difficulties
◦ Working on feature-level




                              Writing Software that Matters
   The goal of TDD is specification (Design) and not validation
    ◦   But we always seem to think of TDD as testing tool. We focus on the verification. IMHO
        clean code, test assertions and serving as regression suite are all side effects of TDD.
    ◦   Code by example to implement features but when those examples are done then they act as
        tests.
    What went wrong?
 Where to start?
 What to test?
 What not to test?
 How much test in one go?
 What to call the tests?
 How to understand why a test fails?
 The focus on testing, vague terms, more focus on units than behavior, tests reflect
   the structural arrangement of the code
Programmers often think "I'm not going to write all those tests.", "It's really simple code, it
doesn't
need to be tested", "testing is a waste of time", or "I've done this (loop/data
retrieval/functionality, etc.)
millions of times.".




                                                     Writing software that matters
• Core Domain Unit
                                                                            testing (Mocking repo)
                                                                          • MVC unit test (Mocking
                                                                            domain and app
                                                                            services)
                                                                          • AppService Unit Test
                                                                            (mocking domain
                                                                            services)
                                                                          • MVC Acceptance Tests




Our BDD evolution – Though we had so many unit tests, once we push code to QA, we keep getting
surprised with scenarios that we never thought about. Then we decided to make QA do test-case
reviews at the first week of development. We saw a big value in that which led us to start exploring
BDD.



                                                      Writing Software that Matters
   BDD builds on TDD (Discussion: last year presentation)
   Stripping out the word test and making test methods sentences




   Expressive test name is helpful when test fails
   Behavior is more useful word than test – vocabulary change (Jbehave)
   Determine the next most important behavior (next thing system doesn’t do)
   Aha Moment – Requirements are Behavior too!




                                                    Writing Software that matters
    From Testing To Specification.
    You write specifications of what your code will have to do
     - “Specification, not Verification”
    BDD’s definition: "It's about focusing on the behavior of an application from the
     point of view of its stakeholders”
     BDD says you should elevate your mind to a level of behavioral abstraction above
     the code implementation.

   BDD
     ◦   is a second-generation,                                             UT
     ◦   outside-in,
     ◦   pull-based,
     ◦   multiplestakeholder,                                   UT               BDD   UT
     ◦   multiple-scale,
     ◦   high automation, agile methodology.
                                                                                 UT
“It describes a cycle of interactions
with well-defined outputs, resulting
in the delivery of working, tested
software.”


                   Discussions: Press releases


                                                 Writing software that matters
   TDD - BDD
   DDD – BDD
    ◦ Focus on the domain and letting it affect the software very much
    ◦ Ubiquitous language
       DDD enables BDD.
       BDD helps structure the conversations for DDD

   ATDD – BDD
    ◦ "I'd like to avoid "BDD is better than TDD because..." or even "BDD is
      different from TDD (as originally envisioned) because..." TDD is amazing.
      Its initial conception was to solve exactly what I've been trying to do with
      BDD ... It's not the *only* way to come up with good design, and neither is
      BDD.BDD is about understanding the customer's need and
      letting emerging understanding of that need drive the software write ...
      always trying to gain greater understanding. But I bet that's what Kent
      Beck would say if you asked him what TDD was all about."




                                              Writing software that matters
   Vision – Outcomes – Feature – Stories –
    Scenarios


         User Stories:
    In order to [business
      value] As a [role] I
    want to [some action]

          Scenarios:
    Given [context] When
     I do [action] Then I
    should see [outcome]




                             Writing Software that Matters
   It is an expression of the customer’s desire
   It is a Unit of Delivery
   It focuses on the business value
   Each story represents part of a feature and belongs to a
    stake holder (Stake holders belong to a domain)

Title (one line describing the story)
Narrative:
As a [role]
I want [feature]
So that [benefit]
Another flavor:
In order to [business value] As a [role] I want to [some
action]



                                   Writing Software that Matters
   You define scope using Scenarios

Scenario 1: Title
Given [context]
And [some more context]..
When [event]
Then [outcome]
And [another outcome]

The GWT fragments can be written using Gherkin
language. You just create plain text file “.feature”
contain a set of scenario definitions.


                             Writing Software that Matters
   Executable Specifications
    ◦   Each step (scenario) is executable
    ◦   Code scenarios by example
    ◦   Examples become code tests and documentation
    ◦   Scenarios become acceptance tests, regression
        tests and documentation




                                Writing Software that Matters
   Take only what you can consume
   YAGNI
   Any more detail is waste, any less is risk
    Enough is Enough
Agile Manifesto
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

Discussion: Extreme is not good




                                              Writing Software that Matters
   Anyone who cares about the success of the
    project is a stake holder
    ◦ Core stakeholders – the ones with the vision
    ◦ Incident Stakeholders – the non-functional




                                Writing Software that Matters
   Jbehave (Java) – DanNorth/Chris Matt
   Rspec (Ruby)
   Cucubmber (Ruby tool that reads Gherkin)
   Mspec(Context Specifications)
   SpecUnit (SetContext,Because of,ItShould)
   SpecFlow
   Cucumber
   Fitnesse
   Concordion


                           Writing Software that Matters
BDD is more about a mindset rather than the
tools.
 ASP.NET MVC, Specflow, Nunit, Moq, Autofac




                        Writing software that matters
   Easy VS Integration
   VS Debugger Support
   Steps can be defined with any .NET language
   Compiles into a .NET assembly
   Install SpecFlow.Nunit from NuGet
   use existing unit-testing frameworks as the runtime for
    scenario execution




                                    Writing Software that Matters
Writing Software that Matters
   The RSpec Book, David Chelimsky
   http://dannorth.net/introducing-bdd/, Dan
    North
   SPECIFICATION BY EXAMPLE , Gojko Adzik
   http://msdn.microsoft.com/en-
    us/magazine/gg490346.aspx, Brandon Satrom
   http://blog.stevensanderson.com/2010/03/03/b
    ehavior-driven-development-bdd-with-
    specflow-and-aspnet-mvc/, Steven Sanderson
   Domain Driven Design, Eric Evans
   User Stories, Mike Cohen

Más contenido relacionado

La actualidad más candente

Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD123abcda
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)Rohit Bisht
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSmartBear
 
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Introduction to Behaviour Driven Development (BDD) and Cucumber with JavaIntroduction to Behaviour Driven Development (BDD) and Cucumber with Java
Introduction to Behaviour Driven Development (BDD) and Cucumber with JavaJawad Khan
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber Knoldus Inc.
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkinArati Joshi
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 

La actualidad más candente (20)

Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Introduction to Behaviour Driven Development (BDD) and Cucumber with JavaIntroduction to Behaviour Driven Development (BDD) and Cucumber with Java
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Cucumber BDD
Cucumber BDDCucumber BDD
Cucumber BDD
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 
Automated Test Framework with Cucumber
Automated Test Framework with CucumberAutomated Test Framework with Cucumber
Automated Test Framework with Cucumber
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Agile testing
Agile testingAgile testing
Agile testing
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 

Similar a BDD presentation

Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012Justin Gordon
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentAdam Englander
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandMurphy Meng
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDDnunick
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is ImportaintSana Nasar
 
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
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineRemus Langu
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingUtkarsh Khare
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovSvetlin Nakov
 
Tdd 왜 배우기 어려운가
Tdd 왜 배우기 어려운가Tdd 왜 배우기 어려운가
Tdd 왜 배우기 어려운가Jaehoon Oh
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Synerzip
 
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Katy Slemon
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 

Similar a BDD presentation (20)

Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky Deutschland
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDD
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & Jasmine
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Tdd 왜 배우기 어려운가
Tdd 왜 배우기 어려운가Tdd 왜 배우기 어려운가
Tdd 왜 배우기 어려운가
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
 
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Bdd with m spec
Bdd with m specBdd with m spec
Bdd with m spec
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
 
Tdd blog
Tdd blogTdd blog
Tdd blog
 

Último

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 WorkerThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Último (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

BDD presentation

  • 1. Writing software that matters Temesgen B Meheret (Teme) Senior Software Engineer @ Videology Email: teme@videologygroup.com
  • 2. Background  DDs  Why do Projects Fail?  Writing Software that matters  TDD’s promise and it’s shortcomings  BDD’s evolution  BDD – Second generation agile methodology  Enough Talk, now Code!  Summary & Questions Temesgen B Meheret Senior Software Engineer @Videology
  • 3. My name is Temesgen but you can call me “Teme”  Software Engineer and team lead @Videology  Ex-Software Engineer @LCG  Plays Ping-Pong  Why am I here & not @the Fedexfield for the USA-Brazil soccer match? Writing Software that matters
  • 4. How many DDs are you aware of? ◦ DDD, ATDD, TDD, RDD, MDD…  How many DD belts do you need before to be a great developer?   Driven – Keeping the right order ◦ HAPPY WIFE – HAPPY LIFE  Architecture is Opinion. There are no absolutes. It is really up to us to evaluate and take what applies to our situation. ◦ E.g. Aratkilo building architecture Writing Software that Matters
  • 5. Adaptation 7 6 5 4 3 Adaptation 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 Discussion: Selective Unit Testing – Costs and Benefits by Steven Sanderson Where is our team on this curve for BDD? Writing Software that Matters
  • 6. What are the top 3 things that you believe contribute to a failure of a project?  Have you ever practiced TDD in your projects? If so, ◦ Where do you start testing? ◦ What did you test? ◦ How much did you rely on your tests (trust) during refactoring? ◦ How effective were your test in terms of detecting bugs? ◦ What did you think was the main intent for writing unit tests? Writing Software that Matters
  • 7. Delivering Late or Over Budget ◦ Poor planning, estimation ◦ E.g. Deriving requirements from a running application – sheep’s stomach layers  Delivering the wrong thing ◦ Building the product right but not the right product ◦ e.g. Projects shelved after many months of development and investment  Unstable in Production ◦ E.g. The morning after Deployment hell  Costly to maintain ◦ Code Quality  What do you think about asking developers during interviews “How many failed projects have you been part of and what do you think was the cause?” Writing Software that matters
  • 8. Discussion points: Top-Down vs. Bottom-up, Civil-Engineering projects vs. Software projects Practical example: LOE flowing down from Solutions Team, Architecture reviews Writing Software that Matters
  • 9. Software development is all about knowing and delivering WHAT MATTERS most to the business How do you KNOW WHAT MATTERS? Through effective communication! • Tangible Business Value • Delivered on-time, incrementally • Easy to deploy and manage • Robust in Prod • Easy to understand and communicate In order to achieve this we need to be adaptive in our planning, requirements and design. Regression tests also play a big role to be able to embrace change without fear. Discussion: Nothing replaces People. Writing software that matters
  • 10. ◦ Clear Communication between Stakeholders  Discussion: Stake holders and their world point of view ◦ Constant re-Prioritization owned by the product- owner ◦ Immediate feedback at every level ◦ Flexibility – Adapting to Feedback  E.g. client’s needs changed, technology difficulties ◦ Working on feature-level Writing Software that Matters
  • 11. The goal of TDD is specification (Design) and not validation ◦ But we always seem to think of TDD as testing tool. We focus on the verification. IMHO clean code, test assertions and serving as regression suite are all side effects of TDD. ◦ Code by example to implement features but when those examples are done then they act as tests. What went wrong?  Where to start?  What to test?  What not to test?  How much test in one go?  What to call the tests?  How to understand why a test fails?  The focus on testing, vague terms, more focus on units than behavior, tests reflect the structural arrangement of the code Programmers often think "I'm not going to write all those tests.", "It's really simple code, it doesn't need to be tested", "testing is a waste of time", or "I've done this (loop/data retrieval/functionality, etc.) millions of times.". Writing software that matters
  • 12. • Core Domain Unit testing (Mocking repo) • MVC unit test (Mocking domain and app services) • AppService Unit Test (mocking domain services) • MVC Acceptance Tests Our BDD evolution – Though we had so many unit tests, once we push code to QA, we keep getting surprised with scenarios that we never thought about. Then we decided to make QA do test-case reviews at the first week of development. We saw a big value in that which led us to start exploring BDD. Writing Software that Matters
  • 13. BDD builds on TDD (Discussion: last year presentation)  Stripping out the word test and making test methods sentences  Expressive test name is helpful when test fails  Behavior is more useful word than test – vocabulary change (Jbehave)  Determine the next most important behavior (next thing system doesn’t do)  Aha Moment – Requirements are Behavior too! Writing Software that matters
  • 14. From Testing To Specification. You write specifications of what your code will have to do - “Specification, not Verification”  BDD’s definition: "It's about focusing on the behavior of an application from the point of view of its stakeholders”  BDD says you should elevate your mind to a level of behavioral abstraction above the code implementation.  BDD ◦ is a second-generation, UT ◦ outside-in, ◦ pull-based, ◦ multiplestakeholder, UT BDD UT ◦ multiple-scale, ◦ high automation, agile methodology. UT “It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software.” Discussions: Press releases Writing software that matters
  • 15. TDD - BDD  DDD – BDD ◦ Focus on the domain and letting it affect the software very much ◦ Ubiquitous language  DDD enables BDD.  BDD helps structure the conversations for DDD  ATDD – BDD ◦ "I'd like to avoid "BDD is better than TDD because..." or even "BDD is different from TDD (as originally envisioned) because..." TDD is amazing. Its initial conception was to solve exactly what I've been trying to do with BDD ... It's not the *only* way to come up with good design, and neither is BDD.BDD is about understanding the customer's need and letting emerging understanding of that need drive the software write ... always trying to gain greater understanding. But I bet that's what Kent Beck would say if you asked him what TDD was all about." Writing software that matters
  • 16. Vision – Outcomes – Feature – Stories – Scenarios User Stories: In order to [business value] As a [role] I want to [some action] Scenarios: Given [context] When I do [action] Then I should see [outcome] Writing Software that Matters
  • 17. It is an expression of the customer’s desire  It is a Unit of Delivery  It focuses on the business value  Each story represents part of a feature and belongs to a stake holder (Stake holders belong to a domain) Title (one line describing the story) Narrative: As a [role] I want [feature] So that [benefit] Another flavor: In order to [business value] As a [role] I want to [some action] Writing Software that Matters
  • 18. You define scope using Scenarios Scenario 1: Title Given [context] And [some more context].. When [event] Then [outcome] And [another outcome] The GWT fragments can be written using Gherkin language. You just create plain text file “.feature” contain a set of scenario definitions. Writing Software that Matters
  • 19. Executable Specifications ◦ Each step (scenario) is executable ◦ Code scenarios by example ◦ Examples become code tests and documentation ◦ Scenarios become acceptance tests, regression tests and documentation Writing Software that Matters
  • 20. Take only what you can consume  YAGNI  Any more detail is waste, any less is risk Enough is Enough Agile Manifesto Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan Discussion: Extreme is not good Writing Software that Matters
  • 21. Anyone who cares about the success of the project is a stake holder ◦ Core stakeholders – the ones with the vision ◦ Incident Stakeholders – the non-functional Writing Software that Matters
  • 22. Jbehave (Java) – DanNorth/Chris Matt  Rspec (Ruby)  Cucubmber (Ruby tool that reads Gherkin)  Mspec(Context Specifications)  SpecUnit (SetContext,Because of,ItShould)  SpecFlow  Cucumber  Fitnesse  Concordion Writing Software that Matters
  • 23. BDD is more about a mindset rather than the tools.  ASP.NET MVC, Specflow, Nunit, Moq, Autofac Writing software that matters
  • 24. Easy VS Integration  VS Debugger Support  Steps can be defined with any .NET language  Compiles into a .NET assembly  Install SpecFlow.Nunit from NuGet  use existing unit-testing frameworks as the runtime for scenario execution Writing Software that Matters
  • 26. The RSpec Book, David Chelimsky  http://dannorth.net/introducing-bdd/, Dan North  SPECIFICATION BY EXAMPLE , Gojko Adzik  http://msdn.microsoft.com/en- us/magazine/gg490346.aspx, Brandon Satrom  http://blog.stevensanderson.com/2010/03/03/b ehavior-driven-development-bdd-with- specflow-and-aspnet-mvc/, Steven Sanderson  Domain Driven Design, Eric Evans  User Stories, Mike Cohen