SlideShare a Scribd company logo
The whole enchilada

    Inception to delivery in
         just 2 weeks




                               1
We write code... and we
    write it well

Oh... And we’re ON A
        BOAT!




                          2
Steve Jackson                                           Dave Shah
@stevejxsn                                             @daveshah
steve.jackson@leandogsoftware.com   dave.shah@leandogsoftware.com




                                                               3
WE LOVE BURRITOS...




                      4
We love apps....




                   5
We LOVE FEEDBACK!




                    6
Making assumptions explicit




                              7
Features




           8
Low Fidelity Prototyping




                           9
We Wrote a cuke...
Feature: Getting directions to Ohio City Burrito

As a hungry burrito lover
I want to drive to OCB
So I can get a Brother’s Burrito

Scenario: Directions button should take us to Google
Maps

Given I'm hungry for some OCB
When I touch the map icon
Then Google maps should provide me with directions




                                                       10
What’s A CUKE?...
                    Feature:

                    As a hungry burrito lover
                    I want to drive to OCB
                    So I can get a Brother’s

                    Scenario: Directions butt
                    take us to Google Maps

                    Given I'm hungry for some
                    When I touch the map icon
                    Then Google maps should p
                    with directions
                    CUKES ARE TESTS
                                          11
Why test first?




                  (MORE ON THIS LATER...)


                                            12
Why test first?   (CONVINCING YOUR BOSS)




                          CapersJones, SoftwareAssessments, Benchmarks, andBestPractices- Addison- Wesley, 2000




                                                                                                                  13
ATDD
     Acceptance Test    Developer Test
Define
 Def             Fail
                 Def         Fail
                             Def

                            TDD
                                      Pass
                                      Def



 Pass
 Def                       Refactor
                             Def


                                             14
Three amigos



 Knows what to build
 Knows how to build it
 Knows how to verify it




                           15
Our First cuke
Feature: Getting directions to Ohio City Burrito

As a hungry burrito lover
I want to drive to OCB
So I can get a Brother’s Burrito

Scenario: Directions button should take us to Google
Maps

Given I'm hungry for some OCB
When I touch the map icon
Then Google maps should provide me with directions




                                                       16
Why ATDD?
 Constant Collaboration
 Improved Understanding
 Eliminates Waste
 Move Risk Forward
 Bake Quality In




                           17
Sounds great in theory... lets see some
code!




                                          18
time travel




              19
@Override
protected void onStart() {
    super.onStart();
    ListView menuListView = (ListView) findViewById(id.menu_list_view);

    menuListView.setAdapter(new ArrayAdapter<String>(
            this,android.R.layout.simple_list_item_1,
            Arrays.asList("Burritos","Tacos","Choices and Additions")));
}




                                                                    20
Scenario: Checking pricesGiven I want to see what Ohio City Burrito
serves
When I touch the menu signThen I should see the prices:
| Brother’s Burrito | $6.15 || Baby Burrito      | $1.85 |
 |




                                                                  21
Then /^I should see the prices:$/ do |expected_items|
  actual_items = []
  expected_items.raw.each do |item, expected_price|
    price = on(MenuScreen).price item
    actual_items << [item, price]
  end
  expected_items.diff! actual_items
end




                                                        22
class MenuScreen
class MenuScreen
  include Gametel
  include Gametel

  ITEM = 0
  button(:directions, :id => "directions_button")
  DESCRIPTION = 1
  button(:call, :id => "call_button")
  PRICE = 2
end

  button(:directions, :id => "directions_button")
  button(:call, :id => "call_button")

  def price(item)
    Gametel::Views::ListItem.new(platform, :text => item).text[PRICE]
  end
end




                                                                   23
And Now...
LIVE
CODING!!!!




             24
So we mentioned science...




                             25
So we mentioned science...




                             26
So we mentioned science...
     Acceptance Test      Developer Test
Define
 Def             Fail
                 Def           Fail
                               Def

                               TDD
                                         Pass
                                         Def



 Pass
 Def                          Refactor
                                Def


                                                 27
                                                12
So we mentioned science...
                     Write a Test == Experiment
          Hypothesis               Fail
                                   Def


                                      Results
                        Repeat          Pass
                                         Def


                              Conclusion
                                 Refactor
                                  Def


                                                 28
                                                12
Thanks!




          Michael Lemley
          @audienceofnone




                      29
Happy hacking!

           https://github.com/leandog/OCBMobile
Steve Jackson                                           Dave Shah
@stevejxsn                                             @daveshah
steve.jackson@leandogsoftware.com   dave.shah@leandogsoftware.com




                                                               30

More Related Content

Viewers also liked

Data visualization
Data visualizationData visualization
Data visualization
kksijo
 
You are my all in all
You are my all in allYou are my all in all
You are my all in all
MrAiono
 
Kumpulan materi-pendapatan-nasional-1
Kumpulan materi-pendapatan-nasional-1Kumpulan materi-pendapatan-nasional-1
Kumpulan materi-pendapatan-nasional-1apasalahkukaubuat
 
MIT 100K Pitch Contest Keynote 2012
MIT 100K Pitch Contest Keynote 2012MIT 100K Pitch Contest Keynote 2012
MIT 100K Pitch Contest Keynote 2012
Rahim Fazal
 
Can ban ve thiet ke va lap trinh game
Can ban ve thiet ke va lap trinh gameCan ban ve thiet ke va lap trinh game
Can ban ve thiet ke va lap trinh game
Kim Hyun Hai
 
The Bunker Script
The Bunker ScriptThe Bunker Script
The Bunker Script
danniebonner
 
Alat peraga secang
Alat peraga  secangAlat peraga  secang
Alat peraga secang
rebifirmansyah
 
112988 633632132031191250
112988 633632132031191250112988 633632132031191250
112988 633632132031191250143mannu
 
自分に合ったWeb出店とは? in まるたまサマースクール
自分に合ったWeb出店とは? in まるたまサマースクール自分に合ったWeb出店とは? in まるたまサマースクール
自分に合ったWeb出店とは? in まるたまサマースクール
Rikiya Suzuki
 
Basics of r commands
Basics of r commandsBasics of r commands
Basics of r commands
kksijo
 
Public contests of neologisms in Estonia
Public contests of neologisms in EstoniaPublic contests of neologisms in Estonia
Public contests of neologisms in Estonia
TERMCAT
 

Viewers also liked (17)

Data visualization
Data visualizationData visualization
Data visualization
 
You are my all in all
You are my all in allYou are my all in all
You are my all in all
 
vaulin
vaulinvaulin
vaulin
 
De toan a_2012
De toan a_2012De toan a_2012
De toan a_2012
 
Kumpulan materi-pendapatan-nasional-1
Kumpulan materi-pendapatan-nasional-1Kumpulan materi-pendapatan-nasional-1
Kumpulan materi-pendapatan-nasional-1
 
burak t a
burak t aburak t a
burak t a
 
MIT 100K Pitch Contest Keynote 2012
MIT 100K Pitch Contest Keynote 2012MIT 100K Pitch Contest Keynote 2012
MIT 100K Pitch Contest Keynote 2012
 
Can ban ve thiet ke va lap trinh game
Can ban ve thiet ke va lap trinh gameCan ban ve thiet ke va lap trinh game
Can ban ve thiet ke va lap trinh game
 
Abu bakar al miski
Abu bakar al miskiAbu bakar al miski
Abu bakar al miski
 
The Bunker Script
The Bunker ScriptThe Bunker Script
The Bunker Script
 
Subtraction 5
Subtraction 5Subtraction 5
Subtraction 5
 
Alat peraga secang
Alat peraga  secangAlat peraga  secang
Alat peraga secang
 
112988 633632132031191250
112988 633632132031191250112988 633632132031191250
112988 633632132031191250
 
自分に合ったWeb出店とは? in まるたまサマースクール
自分に合ったWeb出店とは? in まるたまサマースクール自分に合ったWeb出店とは? in まるたまサマースクール
自分に合ったWeb出店とは? in まるたまサマースクール
 
Trin-E-Cards
Trin-E-CardsTrin-E-Cards
Trin-E-Cards
 
Basics of r commands
Basics of r commandsBasics of r commands
Basics of r commands
 
Public contests of neologisms in Estonia
Public contests of neologisms in EstoniaPublic contests of neologisms in Estonia
Public contests of neologisms in Estonia
 

Similar to The Whole Enchilada

Week 5
Week 5Week 5
Week 5
EasyStudy3
 
Week 5
Week 5Week 5
Week 5
EasyStudy3
 
Learning Fast With A/B Testing and Continuous Deployment
Learning Fast With A/B Testing and Continuous DeploymentLearning Fast With A/B Testing and Continuous Deployment
Learning Fast With A/B Testing and Continuous Deployment
Brett Durrett
 
Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1
Aodrulez
 
How to talk to developers for your first prototype.
How to talk to developers for your first prototype.How to talk to developers for your first prototype.
How to talk to developers for your first prototype.
Dan Rockwell
 
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasTalking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katas
Rachel M. Carmena
 
When to embrace Behavior Driven Development?
When to embrace Behavior Driven Development?When to embrace Behavior Driven Development?
When to embrace Behavior Driven Development?
Ranjith Tharayil
 
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Rachel M. Carmena
 
Testing is Fun @Confoo.ca 2012
Testing is Fun @Confoo.ca  2012Testing is Fun @Confoo.ca  2012
Testing is Fun @Confoo.ca 2012Gourav Tiwari
 
Sikuli: Using Screenshots for GUI Automation and Testing
Sikuli: Using Screenshots for GUI Automation and TestingSikuli: Using Screenshots for GUI Automation and Testing
Sikuli: Using Screenshots for GUI Automation and Testingvgod
 

Similar to The Whole Enchilada (11)

Week 5
Week 5Week 5
Week 5
 
Week 5
Week 5Week 5
Week 5
 
Learning Fast With A/B Testing and Continuous Deployment
Learning Fast With A/B Testing and Continuous DeploymentLearning Fast With A/B Testing and Continuous Deployment
Learning Fast With A/B Testing and Continuous Deployment
 
Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1
 
How to talk to developers for your first prototype.
How to talk to developers for your first prototype.How to talk to developers for your first prototype.
How to talk to developers for your first prototype.
 
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasTalking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katas
 
When to embrace Behavior Driven Development?
When to embrace Behavior Driven Development?When to embrace Behavior Driven Development?
When to embrace Behavior Driven Development?
 
Spoilers fosdem-2013
Spoilers fosdem-2013Spoilers fosdem-2013
Spoilers fosdem-2013
 
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
 
Testing is Fun @Confoo.ca 2012
Testing is Fun @Confoo.ca  2012Testing is Fun @Confoo.ca  2012
Testing is Fun @Confoo.ca 2012
 
Sikuli: Using Screenshots for GUI Automation and Testing
Sikuli: Using Screenshots for GUI Automation and TestingSikuli: Using Screenshots for GUI Automation and Testing
Sikuli: Using Screenshots for GUI Automation and Testing
 

Recently uploaded

GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

The Whole Enchilada

  • 1. The whole enchilada Inception to delivery in just 2 weeks 1
  • 2. We write code... and we write it well Oh... And we’re ON A BOAT! 2
  • 3. Steve Jackson Dave Shah @stevejxsn @daveshah steve.jackson@leandogsoftware.com dave.shah@leandogsoftware.com 3
  • 10. We Wrote a cuke... Feature: Getting directions to Ohio City Burrito As a hungry burrito lover I want to drive to OCB So I can get a Brother’s Burrito Scenario: Directions button should take us to Google Maps Given I'm hungry for some OCB When I touch the map icon Then Google maps should provide me with directions 10
  • 11. What’s A CUKE?... Feature: As a hungry burrito lover I want to drive to OCB So I can get a Brother’s Scenario: Directions butt take us to Google Maps Given I'm hungry for some When I touch the map icon Then Google maps should p with directions CUKES ARE TESTS 11
  • 12. Why test first? (MORE ON THIS LATER...) 12
  • 13. Why test first? (CONVINCING YOUR BOSS) CapersJones, SoftwareAssessments, Benchmarks, andBestPractices- Addison- Wesley, 2000 13
  • 14. ATDD Acceptance Test Developer Test Define Def Fail Def Fail Def TDD Pass Def Pass Def Refactor Def 14
  • 15. Three amigos  Knows what to build  Knows how to build it  Knows how to verify it 15
  • 16. Our First cuke Feature: Getting directions to Ohio City Burrito As a hungry burrito lover I want to drive to OCB So I can get a Brother’s Burrito Scenario: Directions button should take us to Google Maps Given I'm hungry for some OCB When I touch the map icon Then Google maps should provide me with directions 16
  • 17. Why ATDD?  Constant Collaboration  Improved Understanding  Eliminates Waste  Move Risk Forward  Bake Quality In 17
  • 18. Sounds great in theory... lets see some code! 18
  • 20. @Override protected void onStart() { super.onStart(); ListView menuListView = (ListView) findViewById(id.menu_list_view); menuListView.setAdapter(new ArrayAdapter<String>( this,android.R.layout.simple_list_item_1, Arrays.asList("Burritos","Tacos","Choices and Additions"))); } 20
  • 21. Scenario: Checking pricesGiven I want to see what Ohio City Burrito serves When I touch the menu signThen I should see the prices: | Brother’s Burrito | $6.15 || Baby Burrito | $1.85 | | 21
  • 22. Then /^I should see the prices:$/ do |expected_items| actual_items = [] expected_items.raw.each do |item, expected_price| price = on(MenuScreen).price item actual_items << [item, price] end expected_items.diff! actual_items end 22
  • 23. class MenuScreen class MenuScreen include Gametel include Gametel ITEM = 0 button(:directions, :id => "directions_button") DESCRIPTION = 1 button(:call, :id => "call_button") PRICE = 2 end button(:directions, :id => "directions_button") button(:call, :id => "call_button") def price(item) Gametel::Views::ListItem.new(platform, :text => item).text[PRICE] end end 23
  • 25. So we mentioned science... 25
  • 26. So we mentioned science... 26
  • 27. So we mentioned science... Acceptance Test Developer Test Define Def Fail Def Fail Def TDD Pass Def Pass Def Refactor Def 27 12
  • 28. So we mentioned science... Write a Test == Experiment Hypothesis Fail Def Results Repeat Pass Def Conclusion Refactor Def 28 12
  • 29. Thanks! Michael Lemley @audienceofnone 29
  • 30. Happy hacking! https://github.com/leandog/OCBMobile Steve Jackson Dave Shah @stevejxsn @daveshah steve.jackson@leandogsoftware.com dave.shah@leandogsoftware.com 30