SlideShare une entreprise Scribd logo
1  sur  30
SpecFlow:
Pragmatic BDD for .NET
NDC 2011
             GASPAR NAGY
             gn@techtalk.at
             Twitter: @gasparnagy

             JONAS BANDI
             jonas.bandi@techtalk.ch
             Twitter: @jbandi


Oslo, 8. June 2011


                                       COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
TechTalk at a glance
•   Established: 1993
•   Branches: Austria, Hungary, Switzerland
•   3 Managing partners: no external owners
•   Employees: ~ 60 employees
•   Turnover 2010: ~ 7 Mio CHF
•   Risk rating: very low risk
•   Self-financing, healthy growth




                                                            TechTalk office, Vienna/Austria


                                              COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
The audience?
• Who is practicing agile Development?
• Who is practicing TDD?
• Who is doing Acceptance Test Driven
  Development or Behavior Driven
  Development?
• Who is using Cucumber, Fitnesse,
  Concordion, NBehave or a similar tool?
• Who knows SpecFlow?



3
Overview & Agenda

• BDD: Summary
• SpecFlow Introduction
• Demo: SpecFlow Hands On
• Demo: MonoDevelop
• Q&A
                            The research is partially supported by the
                            project of Eötvös Loránd University:
                            TÁMOP-4.2.1.B-09/1/KMR-2010-0003

4
BDD – A definition from Dan North
    BDD is a second-generation,
    outside-in, pull-based, multiple-
    stakeholder, multiple-scale, high-
    automation, agile methodology.

    It describes a cycle of
    interactions with well-defined
    outputs, resulting in the delivery
    of working, tested software that
    matters.        Dan North, Agile Testing, Specifications and BDD Exchange 2009

5
BDD: An attempt to fit it all together
                                Specification by
              TDD                  Example
      Test Driven Development                      Definition of
                                                      Done
          DDD
  Domain Driven Design
                                  BDD
                                Behavior Driven          ATDD
           DSL                   Development       Acceptance Test Driven
                                                       Development
Domain Specific Language

                  Outside-In                User Stories
                 Development
  6
Specification by Example
    • Abstract requirements and
      specifications are not a good
      tool for communication.
    • Concrete examples are much
      better.
    • Usually examples are not
      formalized and not shared.
                   are composed of
Examples                             Tests
    elaborate                          verify & validate

                Requirements                               Books by Gojko Adzic

7
Detail Discussions…
    We want to encourage new users to place an order.
    Therefore we are going to offer 10% discount on
    every initial order.




                                                              Register as “bart_bookworm”
                                                              Go to “/catalog/search”
                                                              Enter “ISBN-0955683610”
                                                              Click “Search”
                                                              Click “Add to Cart”
                                                              Click “View Cart”
                                                              Verify “Subtotal” is “$33.75”



             public void CalculateDiscount(Order order)
             {
               if (order.Customer.IsNew)
                 order.FinalAmount = Math.Round(order.Total * 9/10);
             }

8
… Illustrated with Examples




    Given a user who hasn't placed an order yet

    When the user puts a book into the shopping cart

    Then a discount of 10% should be applied on the cart total.
9
Show Implicit Expectations
     Actually, this is not quite right:
     books on sale should be excluded from
     discount.




10
3 Amigos
                           Exceptional,
     Happy
             Feasibility   Edge Cases
      Path




11
TDD




12
ATDD: Rising the Level of Abstraction




13
Outside-In Development
• Always start with a Story
• What development should focus on:
     •Providing business value
     •Satisfying stakeholder needs   1

     •Software that matters              2
                                             3

     •Consumable software
                                                 4
                                                     5




14
BDD: An attempt to fit it all together
                                 Specification by
               TDD                  Example
       Test Driven Development                      Definition of
                                                       Done
           DDD
  Domain Driven Design
                                   BDD
                                 Behavior Driven          ATDD
            DSL                   Development       Acceptance Test Driven
                                                        Development
Domain Specific Language

                   Outside-In                User Stories
                  Development
  15
SpecFlow
• Open-source BDD tool for .NET             www.specflow.org

     • www.specflow.org
     • github.com/techtalk/SpecFlow

• Focus on high level behavior: features /
  acceptance tests
• Focus on story-style plain text specifications
• Using Gherkin as DSL for specifications
• Uses existing testing frameworks for
  execution (Nunit, MSTest, xUnit)
       • VisualStudio / Build integration

16
SpecFlow History
• Founded in late 2009 by TechTalk
                                                     www.specflow.org



• Goals:
     • A pragmatic BDD tool for .NET
     • Provide a frictionless experience for .NET
       environments
     • Use existing tools: VisualStudio, UnitTest-
       Frameworks
• SpecFlow is now used in most projects
  by TechTalk
• SpecFlow is used all over the world.
18
19
Integrations…
                MSBuild




                     MSTest
20
Contributors
Jonas Bandi, Darren Cauthon, Christian
Hassa, Gaspar Nagy, Dale Ragan
Vagif Abilov, Jon Archer, Xerxes Battiwalla,
Ryan Burnham, Matt Ellis, Csaba Gerő,
John Gietzen, Marcus Hammarberg, Kerry
Jones, Mátyás Kabódi, Avram Korets,
Viktor Nemes, Max Paulousky, Chris Roff,
Daniel Sack, Attila Sztupák, Charles Weld,
Steven Zhang
21
DEMO



22
http://www.stackoverflow.com
       tag: specflow


           “haacked”
                                           Phil Haack
                       ASP.NET MVC: A New Framework
                          for Building Web Applications




              “forked”



DEMO
23
MonoDevelop Integration
by Dale Ragan



dale.ragan@sinesignal.com
Twitter: @dwragan




 24
Teaser Session 2
                     Requirements Analysis

                   Executable & Automated
                              Specifications

               Improving Feedback with a
                Transparent Development
                                 Process

                      Living Documentation

25
Other BDD Sessions at the NDC
Thursday Morning:
• Gojko Adzic
• Scott Bellware




 26
Questions &
Discussion




  GASPAR NAGY                                    JONAS BANDI
  gaspar.nagy@techtalk.at           jonas.bandi@techtalk.ch
  Twitter: @gasparnagy                      Twitter: @jbandi

                            COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
Other
Interpretations
        of BDD

        COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
BDD? – Bushido Driven Development


     Write good code
     or kill yourself
     out of shame.
                @durp


29
Boss Driven
     Development




                   Beer Driven
                   Development
30
Ah ok... I understand. It is done!"

BDD? –       What? What do you mean?"


Bug Driven                       Well it is done. The system is finished!

             Well, no ... I don't see an icon where I can start it?
Devel-       I want you to build YouInstant Social Turbo
                            Oh! an are right. That's a bug! I will fix it!
opment       Communication Workstation Terminal
              ... five minutes later ...
                                   Ok, the icon is here. Now it is done!

             But when I double-click the icon nothing happens!

                             Oh! You are right. That’s a bug! I will fix it.

             ... five minutes later ...
                       Ok, the app starts when you double click. Now
31                                                       it is done!"

Contenu connexe

Tendances

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
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect coupleStephen Tucker
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsIosif Itkin
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven DevelopmentViraf Karai
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!Kaizenko
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)Rohit Bisht
 
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...agil8 Ltd
 
Scrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboScrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboNaveen Kumar Singh
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven developmenttoteb5
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Ajay Danait
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentSteven Mak
 

Tendances (20)

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
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect couple
 
Journey of atdd
Journey of atddJourney of atdd
Journey of atdd
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
 
TDD and BDD and ATDD
TDD and BDD and ATDDTDD and BDD and ATDD
TDD and BDD and ATDD
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)
 
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...
Agile Software Development and Test Driven Development: Agil8's Dave Putman 3...
 
Scrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboScrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - Colombo
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Atdd half day_new_1_up
Atdd half day_new_1_upAtdd half day_new_1_up
Atdd half day_new_1_up
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 

En vedette

SpecFlow and some things I've picked up
SpecFlow and some things I've picked upSpecFlow and some things I've picked up
SpecFlow and some things I've picked upMarcus Hammarberg
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowChristian Hassa
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Gáspár Nagy
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 

En vedette (12)

Using Specflow for BDD
Using Specflow for BDDUsing Specflow for BDD
Using Specflow for BDD
 
SpecFlow and some things I've picked up
SpecFlow and some things I've picked upSpecFlow and some things I've picked up
SpecFlow and some things I've picked up
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Julho 2016 - BDD com SpecFlow
Julho 2016 - BDD com SpecFlowJulho 2016 - BDD com SpecFlow
Julho 2016 - BDD com SpecFlow
 
Specflow
SpecflowSpecflow
Specflow
 
Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlow
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
 
API Testing
API TestingAPI Testing
API Testing
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
Copyright
CopyrightCopyright
Copyright
 
Copyright Act 1957
Copyright Act 1957Copyright Act 1957
Copyright Act 1957
 

Similaire à NDC 2011 - SpecFlow: Pragmatic BDD for .NET

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
 
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
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-testsSkills Matter
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-testsSkills Matter
 
Closing the gap between development and production with Datadog and NerdVisio...
Closing the gap between development and production with Datadog and NerdVisio...Closing the gap between development and production with Datadog and NerdVisio...
Closing the gap between development and production with Datadog and NerdVisio...David Thacker
 
NDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDNDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDjbandi
 
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
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database RefactoringAnton Keks
 
It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny daybcoder
 
Friday final test
Friday final testFriday final test
Friday final testbcoder
 
How to contribute to open source
How to contribute to open sourceHow to contribute to open source
How to contribute to open sourceAlbert Wong
 
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it doneFrom dev to ops and beyond - getting it done
From dev to ops and beyond - getting it doneEdorian
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDDavid Rodenas
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineRemus Langu
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - DetroitMartin Gutenbrunner
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 

Similaire à NDC 2011 - SpecFlow: Pragmatic BDD for .NET (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
 
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)
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
 
Closing the gap between development and production with Datadog and NerdVisio...
Closing the gap between development and production with Datadog and NerdVisio...Closing the gap between development and production with Datadog and NerdVisio...
Closing the gap between development and production with Datadog and NerdVisio...
 
NDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDNDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDD
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database Refactoring
 
It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny day
 
Friday final test
Friday final testFriday final test
Friday final test
 
How to contribute to open source
How to contribute to open sourceHow to contribute to open source
How to contribute to open source
 
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it doneFrom dev to ops and beyond - getting it done
From dev to ops and beyond - getting it done
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & Jasmine
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 

Plus de jbandi

From User Action to Framework Reaction
From User Action to Framework ReactionFrom User Action to Framework Reaction
From User Action to Framework Reactionjbandi
 
From User Action to Framework Reaction
From User Action to Framework ReactionFrom User Action to Framework Reaction
From User Action to Framework Reactionjbandi
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?jbandi
 
The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015jbandi
 
Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?jbandi
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014jbandi
 
Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)jbandi
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMjbandi
 
Kann JavaScript elegant sein?
Kann JavaScript elegant sein?Kann JavaScript elegant sein?
Kann JavaScript elegant sein?jbandi
 
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?jbandi
 
Testing: Chances and Challenges in an agile World
Testing: Chances and Challenges in an agile WorldTesting: Chances and Challenges in an agile World
Testing: Chances and Challenges in an agile Worldjbandi
 

Plus de jbandi (11)

From User Action to Framework Reaction
From User Action to Framework ReactionFrom User Action to Framework Reaction
From User Action to Framework Reaction
 
From User Action to Framework Reaction
From User Action to Framework ReactionFrom User Action to Framework Reaction
From User Action to Framework Reaction
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015
 
Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014
 
Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVM
 
Kann JavaScript elegant sein?
Kann JavaScript elegant sein?Kann JavaScript elegant sein?
Kann JavaScript elegant sein?
 
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?
Testing Heute: ein Relikt aus dem Zeitalter des goldenen Wasserfalls?
 
Testing: Chances and Challenges in an agile World
Testing: Chances and Challenges in an agile WorldTesting: Chances and Challenges in an agile World
Testing: Chances and Challenges in an agile World
 

Dernier

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
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...apidays
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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 RobisonAnna Loughnan Colquhoun
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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 DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
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...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

NDC 2011 - SpecFlow: Pragmatic BDD for .NET

  • 1. SpecFlow: Pragmatic BDD for .NET NDC 2011 GASPAR NAGY gn@techtalk.at Twitter: @gasparnagy JONAS BANDI jonas.bandi@techtalk.ch Twitter: @jbandi Oslo, 8. June 2011 COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
  • 2. TechTalk at a glance • Established: 1993 • Branches: Austria, Hungary, Switzerland • 3 Managing partners: no external owners • Employees: ~ 60 employees • Turnover 2010: ~ 7 Mio CHF • Risk rating: very low risk • Self-financing, healthy growth TechTalk office, Vienna/Austria COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
  • 3. The audience? • Who is practicing agile Development? • Who is practicing TDD? • Who is doing Acceptance Test Driven Development or Behavior Driven Development? • Who is using Cucumber, Fitnesse, Concordion, NBehave or a similar tool? • Who knows SpecFlow? 3
  • 4. Overview & Agenda • BDD: Summary • SpecFlow Introduction • Demo: SpecFlow Hands On • Demo: MonoDevelop • Q&A The research is partially supported by the project of Eötvös Loránd University: TÁMOP-4.2.1.B-09/1/KMR-2010-0003 4
  • 5. BDD – A definition from Dan North BDD is a second-generation, outside-in, pull-based, multiple- stakeholder, multiple-scale, high- automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters. Dan North, Agile Testing, Specifications and BDD Exchange 2009 5
  • 6. BDD: An attempt to fit it all together Specification by TDD Example Test Driven Development Definition of Done DDD Domain Driven Design BDD Behavior Driven ATDD DSL Development Acceptance Test Driven Development Domain Specific Language Outside-In User Stories Development 6
  • 7. Specification by Example • Abstract requirements and specifications are not a good tool for communication. • Concrete examples are much better. • Usually examples are not formalized and not shared. are composed of Examples Tests elaborate verify & validate Requirements Books by Gojko Adzic 7
  • 8. Detail Discussions… We want to encourage new users to place an order. Therefore we are going to offer 10% discount on every initial order. Register as “bart_bookworm” Go to “/catalog/search” Enter “ISBN-0955683610” Click “Search” Click “Add to Cart” Click “View Cart” Verify “Subtotal” is “$33.75” public void CalculateDiscount(Order order) { if (order.Customer.IsNew) order.FinalAmount = Math.Round(order.Total * 9/10); } 8
  • 9. … Illustrated with Examples Given a user who hasn't placed an order yet When the user puts a book into the shopping cart Then a discount of 10% should be applied on the cart total. 9
  • 10. Show Implicit Expectations Actually, this is not quite right: books on sale should be excluded from discount. 10
  • 11. 3 Amigos Exceptional, Happy Feasibility Edge Cases Path 11
  • 13. ATDD: Rising the Level of Abstraction 13
  • 14. Outside-In Development • Always start with a Story • What development should focus on: •Providing business value •Satisfying stakeholder needs 1 •Software that matters 2 3 •Consumable software 4 5 14
  • 15. BDD: An attempt to fit it all together Specification by TDD Example Test Driven Development Definition of Done DDD Domain Driven Design BDD Behavior Driven ATDD DSL Development Acceptance Test Driven Development Domain Specific Language Outside-In User Stories Development 15
  • 16. SpecFlow • Open-source BDD tool for .NET www.specflow.org • www.specflow.org • github.com/techtalk/SpecFlow • Focus on high level behavior: features / acceptance tests • Focus on story-style plain text specifications • Using Gherkin as DSL for specifications • Uses existing testing frameworks for execution (Nunit, MSTest, xUnit) • VisualStudio / Build integration 16
  • 17. SpecFlow History • Founded in late 2009 by TechTalk www.specflow.org • Goals: • A pragmatic BDD tool for .NET • Provide a frictionless experience for .NET environments • Use existing tools: VisualStudio, UnitTest- Frameworks • SpecFlow is now used in most projects by TechTalk • SpecFlow is used all over the world. 18
  • 18. 19
  • 19. Integrations… MSBuild MSTest 20
  • 20. Contributors Jonas Bandi, Darren Cauthon, Christian Hassa, Gaspar Nagy, Dale Ragan Vagif Abilov, Jon Archer, Xerxes Battiwalla, Ryan Burnham, Matt Ellis, Csaba Gerő, John Gietzen, Marcus Hammarberg, Kerry Jones, Mátyás Kabódi, Avram Korets, Viktor Nemes, Max Paulousky, Chris Roff, Daniel Sack, Attila Sztupák, Charles Weld, Steven Zhang 21
  • 22. http://www.stackoverflow.com tag: specflow “haacked” Phil Haack ASP.NET MVC: A New Framework for Building Web Applications “forked” DEMO 23
  • 23. MonoDevelop Integration by Dale Ragan dale.ragan@sinesignal.com Twitter: @dwragan 24
  • 24. Teaser Session 2 Requirements Analysis Executable & Automated Specifications Improving Feedback with a Transparent Development Process Living Documentation 25
  • 25. Other BDD Sessions at the NDC Thursday Morning: • Gojko Adzic • Scott Bellware 26
  • 26. Questions & Discussion GASPAR NAGY JONAS BANDI gaspar.nagy@techtalk.at jonas.bandi@techtalk.ch Twitter: @gasparnagy Twitter: @jbandi COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
  • 27. Other Interpretations of BDD COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH
  • 28. BDD? – Bushido Driven Development Write good code or kill yourself out of shame. @durp 29
  • 29. Boss Driven Development Beer Driven Development 30
  • 30. Ah ok... I understand. It is done!" BDD? – What? What do you mean?" Bug Driven Well it is done. The system is finished! Well, no ... I don't see an icon where I can start it? Devel- I want you to build YouInstant Social Turbo Oh! an are right. That's a bug! I will fix it! opment Communication Workstation Terminal ... five minutes later ... Ok, the icon is here. Now it is done! But when I double-click the icon nothing happens! Oh! You are right. That’s a bug! I will fix it. ... five minutes later ... Ok, the app starts when you double click. Now 31 it is done!"