SlideShare una empresa de Scribd logo
1 de 33
Building .NET
Applications with BDD
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
Background
• At TechTalk we are trying to live a BDD
  process for several years
• We started SpecFlow in 2009 out of a
  need to implement BDD
• We have implemented and improved
  our BDD process and knowledge in
  many projects
• … we are still learning    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

3
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

4
The BDD Development Process
                    … how we live it
          Requirements Analysis

        Executable & Automated
                   Specifications


      Improving Feedback with a
Transparent Development Process

           Living Documentation
5
Requirements Analysis & Colaboration
    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);
             }

6
Capturing and Organizing
Requirements


    DEMO



                           Your Product Backlog is more than just a list!
                                                    www.speclog.org

7
Outcome of Requirements Analysis
• Sprint Planning
    •User Stories
    •Acceptance Criterias
    •… illustrated by Examples




8
Executable & Automated
    Specifications
          Requirements Analysis

        Executable & Automated
                   Specifications


      Improving Feedback with a
Transparent Development Process

           Living Documentation
9
Automation
• Why?
     • iterative & incremental
       development demand a
       continuous feedback
• Challenges
     • Abstraction vs. Reliability
     • Trust
     • Shared Understanding
     • Effort
10
Scenarios: Automating Examples
• Some Formality is needed
     •But: Keep it „business readable“
• Gherkin




11
40 Spoken Languages




12
Writing Maintainable Scenarios


             Specification by Example
             by Gojko Adzic




13
Scripts vs. Declarative Scenarios
Given a clear database
And the database is loaded from "sample-data.sql"
And the webserver is running
When I go to URL: http://localhost:8080/myapp
And I click the "Login" link
And I enter username: john
And I enter password: john99
And I click the "Login" button
Then the page contains text: Hello John!

                      Background:
                      Given the following users:
                      | First Name | Last Name |
                      | John       | Smith     |
                      When John logs in
                      Then a greeting "Hello John!" is displayed.




14
Decouple, Reduce Noise, Focus on
Value
     Given a clear database
     When I create a user "John Smith" with login "jsmith"
     When I login as "jsmith"
     Then a greeting "Hello John!" is displayed.




                          Background:
                          Given the following users:
                          | First Name | Last Name |
                          | John       | Smith     |
                          When John logs in
                          Then a greeting "Hello John!" is displayed.




15
Automation on Different Levels




16
Challenges of UI Automation
• Technical
     •Infrastructure Dependency (Speed, Stability …)
     •Tests run in another Process
• Development Process
     •80% of all changes are in the UI

• Tools can help:
     •Mara, MVCContrib (“Capybara like”)

17
Organization of Features
Features are               TODO: Screenshot

project artifacts:
     •versioned in VCS
     •Hierarchies
     •Change over time     TODO: Screenshot




18
Organizing Steps
• Steps are code
• Organize steps along domain
  concepts. Avoid feature-
  coupled steps
• Scoped steps




19
Organizing Steps
• Application Driver Layer
     •Abstraction
     •Functional composition
     •Reuse




20
Outside-In Development
• Starting from the UI Layer is
  difficult
     •Start with a scribble / sketch
     •Good conventions help (aka.
      semantic markup)                1

     •Progress step by step. Building     2
                                              3
      the UI incrementally                        4
                                                      5


• Progressing to TDD
     •Not always needed?
21
Improving Feedback with a
     Transparent Development Process
           Requirements Analysis

         Executable & Automated
                    Specifications


      Improving Feedback with a
Transparent Development Process

            Living Documentation
22
Transparency
• Why?
     •Trust, Feedback, Learning, Embracing Change
• Scrum Tools
     •Standup, Taskboard, Burndown, Demo,
      Retrospective
• How can BDD help to improve it?
     •Technical Feedback
     •Different Perspective
     •Shared understanding

23
The Project
Dashboard

 DEMO




24
Build Server Integration
• Generating Reports
• Using Tags
• Demo: Build Config




25
Using Tags




31
Living Documentation
           Requirements Analysis

         Executable & Automated
                    Specifications


      Improving Feedback with a
Transparent Development Process

            Living Documentation
32
Evolving the living documentation

           Product Backlog                    Living Documentation

                      AccCrit 1                             AccCrit 1
       User Story 1
                      AccCrit 2   „Done“                    AccCrit 2
                                              Feature 1
                      AccCrit 3                             AccCrit 3
       User Story 2
                      AccCrit 4                             AccCrit 5
                      AccCrit 5                             AccCrit 4
       User Story n                           Feature n
                      AccCrit m                             AccCrit m

     • Units of work                       • Documentation
     • Organized according to              • Organized according to
       priority/value/effort                 functionality/overview
                                           • Versioned/maintained with
                                             source code

33
Living documentation
                                                                           Current sprint                    Features “done”
                                                                                                   merge
                                                                                                    when                       F
      Sprint                                                                US                    accepted
                                                                                    US
     Backlog                                                                 AC                                           F           F
          Acceptance
            Criteria                                                                  AC
     US   Acceptance
                                          refine
                                                                             AC
            Criteria                                                                  AC
                                                                             AC
          Acceptance                      the                                                                         F       F           F
            Criteria
     US                                   specification                               AC
          Acceptance
            Criteria
          Acceptance
            Criteria
                                                                                                             F            F
          Acceptance
     US     Criteria
          Acceptance                                                                                             AC           AC
            Criteria        Given       …            {…}                           validate
                                                              Automation



                                                                                                                 AC           AC
                            When        …            {…}                           continuously
                                                                                                                 AC       living documentation
                            Then        …            {…}
                       specification with examples


                                                                                                                          validate
                                                      executable                                                          continuously
                                                     specification




34
Living Documentation: Feature Tree




35
Pushing Living Documentation
     further


     DEMO




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




 37
Questions &
Discussion




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

                            COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH

Más contenido relacionado

Destacado

Destacado (15)

герої мb[
герої мb[герої мb[
герої мb[
 
IPRO 497-212 Poster
IPRO 497-212 PosterIPRO 497-212 Poster
IPRO 497-212 Poster
 
resume 19 new
resume 19 newresume 19 new
resume 19 new
 
Docmeto 6 tra
Docmeto  6 traDocmeto  6 tra
Docmeto 6 tra
 
Indagini
IndaginiIndagini
Indagini
 
Resume J
Resume JResume J
Resume J
 
Marcus Dwyer in Souther Courier 110815
Marcus Dwyer in Souther Courier 110815Marcus Dwyer in Souther Courier 110815
Marcus Dwyer in Souther Courier 110815
 
прил.име(упр)
прил.име(упр)прил.име(упр)
прил.име(упр)
 
Teste Ágeis para todo o time
Teste Ágeis para todo o timeTeste Ágeis para todo o time
Teste Ágeis para todo o time
 
IT Act 2000
IT Act 2000IT Act 2000
IT Act 2000
 
Koledna magiya
Koledna magiyaKoledna magiya
Koledna magiya
 
collection development policy for e-resources
collection development policy for e-resourcescollection development policy for e-resources
collection development policy for e-resources
 
намиране на лице на правоъгълник
намиране на лице на правоъгълникнамиране на лице на правоъгълник
намиране на лице на правоъгълник
 
Урок 7 числата от 21 до 60
Урок 7 числата от 21 до 60Урок 7 числата от 21 до 60
Урок 7 числата от 21 до 60
 
Bdd training v5.2.0 - public
Bdd training   v5.2.0 - publicBdd training   v5.2.0 - public
Bdd training v5.2.0 - public
 

Similar a NDC 2011 - Building .NET Applications with BDD

Application development using the wso2 developer studio
Application development using the wso2 developer studioApplication development using the wso2 developer studio
Application development using the wso2 developer studioWSO2
 
JIRA Performance After 300,000 Issues
JIRA Performance After 300,000 IssuesJIRA Performance After 300,000 Issues
JIRA Performance After 300,000 IssuesAtlassian
 
Knolidge - Discover What You Have
Knolidge - Discover What You HaveKnolidge - Discover What You Have
Knolidge - Discover What You Haveknolidge
 
Apache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyApache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyYaroslav Tkachenko
 
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010Atlassian
 
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...BrianFraser29
 
Technical Debt - SOTR14 - Clarkie
Technical Debt -  SOTR14 - ClarkieTechnical Debt -  SOTR14 - Clarkie
Technical Debt - SOTR14 - ClarkieAndrew Clarke
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETjbandi
 
Cincom Smalltalk News
Cincom Smalltalk NewsCincom Smalltalk News
Cincom Smalltalk NewsESUG
 
Get your Project back in Shape!
Get your Project back in Shape!Get your Project back in Shape!
Get your Project back in Shape!Joachim Tuchel
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013David Funaro
 
Ágil x Lean Startup no Caipira Ágil
Ágil x Lean Startup no Caipira ÁgilÁgil x Lean Startup no Caipira Ágil
Ágil x Lean Startup no Caipira Ágilalexandre freire
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Michel Buczynski
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Chocolatey Software
 
Behavioral driven development with Behat
Behavioral driven development with BehatBehavioral driven development with Behat
Behavioral driven development with BehatPromet Source
 
Software Development Life Cycle Kb V8.0
Software Development Life Cycle Kb V8.0Software Development Life Cycle Kb V8.0
Software Development Life Cycle Kb V8.0vendor mail
 
Managed Beans: When, Why and How
Managed Beans: When, Why and HowManaged Beans: When, Why and How
Managed Beans: When, Why and HowRussell Maher
 
IBM Cognos 10 Framework Manager in Action
IBM Cognos 10 Framework Manager in ActionIBM Cognos 10 Framework Manager in Action
IBM Cognos 10 Framework Manager in ActionSenturus
 
Start Your Notes App the SuperNTF Way
Start Your Notes App the SuperNTF WayStart Your Notes App the SuperNTF Way
Start Your Notes App the SuperNTF WayKevin Pettitt
 
User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖Maxis Kao
 

Similar a NDC 2011 - Building .NET Applications with BDD (20)

Application development using the wso2 developer studio
Application development using the wso2 developer studioApplication development using the wso2 developer studio
Application development using the wso2 developer studio
 
JIRA Performance After 300,000 Issues
JIRA Performance After 300,000 IssuesJIRA Performance After 300,000 Issues
JIRA Performance After 300,000 Issues
 
Knolidge - Discover What You Have
Knolidge - Discover What You HaveKnolidge - Discover What You Have
Knolidge - Discover What You Have
 
Apache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyApache Flink Adoption at Shopify
Apache Flink Adoption at Shopify
 
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010
Must-have Plugins for Confluence & JIRA - Atlassian Summit 2010
 
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
 
Technical Debt - SOTR14 - Clarkie
Technical Debt -  SOTR14 - ClarkieTechnical Debt -  SOTR14 - Clarkie
Technical Debt - SOTR14 - Clarkie
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
 
Cincom Smalltalk News
Cincom Smalltalk NewsCincom Smalltalk News
Cincom Smalltalk News
 
Get your Project back in Shape!
Get your Project back in Shape!Get your Project back in Shape!
Get your Project back in Shape!
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
Ágil x Lean Startup no Caipira Ágil
Ágil x Lean Startup no Caipira ÁgilÁgil x Lean Startup no Caipira Ágil
Ágil x Lean Startup no Caipira Ágil
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
 
Behavioral driven development with Behat
Behavioral driven development with BehatBehavioral driven development with Behat
Behavioral driven development with Behat
 
Software Development Life Cycle Kb V8.0
Software Development Life Cycle Kb V8.0Software Development Life Cycle Kb V8.0
Software Development Life Cycle Kb V8.0
 
Managed Beans: When, Why and How
Managed Beans: When, Why and HowManaged Beans: When, Why and How
Managed Beans: When, Why and How
 
IBM Cognos 10 Framework Manager in Action
IBM Cognos 10 Framework Manager in ActionIBM Cognos 10 Framework Manager in Action
IBM Cognos 10 Framework Manager in Action
 
Start Your Notes App the SuperNTF Way
Start Your Notes App the SuperNTF WayStart Your Notes App the SuperNTF Way
Start Your Notes App the SuperNTF Way
 
User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖
 

Más 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
 

Más 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
 

Último

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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.pdfsudhanshuwaghmare1
 
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 Scriptwesley chun
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
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
 
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 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I 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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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...
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I 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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

NDC 2011 - Building .NET Applications with BDD

  • 1. Building .NET Applications with BDD 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. Background • At TechTalk we are trying to live a BDD process for several years • We started SpecFlow in 2009 out of a need to implement BDD • We have implemented and improved our BDD process and knowledge in many projects • … we are still learning 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 3
  • 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 4
  • 5. The BDD Development Process … how we live it Requirements Analysis Executable & Automated Specifications Improving Feedback with a Transparent Development Process Living Documentation 5
  • 6. Requirements Analysis & Colaboration 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); } 6
  • 7. Capturing and Organizing Requirements DEMO Your Product Backlog is more than just a list! www.speclog.org 7
  • 8. Outcome of Requirements Analysis • Sprint Planning •User Stories •Acceptance Criterias •… illustrated by Examples 8
  • 9. Executable & Automated Specifications Requirements Analysis Executable & Automated Specifications Improving Feedback with a Transparent Development Process Living Documentation 9
  • 10. Automation • Why? • iterative & incremental development demand a continuous feedback • Challenges • Abstraction vs. Reliability • Trust • Shared Understanding • Effort 10
  • 11. Scenarios: Automating Examples • Some Formality is needed •But: Keep it „business readable“ • Gherkin 11
  • 13. Writing Maintainable Scenarios Specification by Example by Gojko Adzic 13
  • 14. Scripts vs. Declarative Scenarios Given a clear database And the database is loaded from "sample-data.sql" And the webserver is running When I go to URL: http://localhost:8080/myapp And I click the "Login" link And I enter username: john And I enter password: john99 And I click the "Login" button Then the page contains text: Hello John! Background: Given the following users: | First Name | Last Name | | John | Smith | When John logs in Then a greeting "Hello John!" is displayed. 14
  • 15. Decouple, Reduce Noise, Focus on Value Given a clear database When I create a user "John Smith" with login "jsmith" When I login as "jsmith" Then a greeting "Hello John!" is displayed. Background: Given the following users: | First Name | Last Name | | John | Smith | When John logs in Then a greeting "Hello John!" is displayed. 15
  • 17. Challenges of UI Automation • Technical •Infrastructure Dependency (Speed, Stability …) •Tests run in another Process • Development Process •80% of all changes are in the UI • Tools can help: •Mara, MVCContrib (“Capybara like”) 17
  • 18. Organization of Features Features are TODO: Screenshot project artifacts: •versioned in VCS •Hierarchies •Change over time TODO: Screenshot 18
  • 19. Organizing Steps • Steps are code • Organize steps along domain concepts. Avoid feature- coupled steps • Scoped steps 19
  • 20. Organizing Steps • Application Driver Layer •Abstraction •Functional composition •Reuse 20
  • 21. Outside-In Development • Starting from the UI Layer is difficult •Start with a scribble / sketch •Good conventions help (aka. semantic markup) 1 •Progress step by step. Building 2 3 the UI incrementally 4 5 • Progressing to TDD •Not always needed? 21
  • 22. Improving Feedback with a Transparent Development Process Requirements Analysis Executable & Automated Specifications Improving Feedback with a Transparent Development Process Living Documentation 22
  • 23. Transparency • Why? •Trust, Feedback, Learning, Embracing Change • Scrum Tools •Standup, Taskboard, Burndown, Demo, Retrospective • How can BDD help to improve it? •Technical Feedback •Different Perspective •Shared understanding 23
  • 25. Build Server Integration • Generating Reports • Using Tags • Demo: Build Config 25
  • 27. Living Documentation Requirements Analysis Executable & Automated Specifications Improving Feedback with a Transparent Development Process Living Documentation 32
  • 28. Evolving the living documentation Product Backlog Living Documentation AccCrit 1 AccCrit 1 User Story 1 AccCrit 2 „Done“ AccCrit 2 Feature 1 AccCrit 3 AccCrit 3 User Story 2 AccCrit 4 AccCrit 5 AccCrit 5 AccCrit 4 User Story n Feature n AccCrit m AccCrit m • Units of work • Documentation • Organized according to • Organized according to priority/value/effort functionality/overview • Versioned/maintained with source code 33
  • 29. Living documentation Current sprint Features “done” merge when F Sprint US accepted US Backlog AC F F Acceptance Criteria AC US Acceptance refine AC Criteria AC AC Acceptance the F F F Criteria US specification AC Acceptance Criteria Acceptance Criteria F F Acceptance US Criteria Acceptance AC AC Criteria Given … {…} validate Automation AC AC When … {…} continuously AC living documentation Then … {…} specification with examples validate executable continuously specification 34
  • 31. Pushing Living Documentation further DEMO 36
  • 32. Other BDD Sessions at the NDC Thursday Morning: • Gojko Adzic • Scott Bellware 37
  • 33. Questions & Discussion GASPAR NAGY JONAS BANDI gaspar.nagy@techtalk.at jonas.bandi@techtalk.ch Twitter: @gasparnagy Twitter: @jbandi COPYRIGHT 2011, TECHTALK - WWW.TECHTALK.CH