SlideShare ist ein Scribd-Unternehmen logo
1 von 30
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

Weitere ähnliche Inhalte

Andere mochten auch

Data visualization
Data visualizationData visualization
Data visualizationkksijo
 
You are my all in all
You are my all in allYou are my all in all
You are my all in allMrAiono
 
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 2012Rahim 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 gameKim Hyun Hai
 
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 commandskksijo
 
Public contests of neologisms in Estonia
Public contests of neologisms in EstoniaPublic contests of neologisms in Estonia
Public contests of neologisms in EstoniaTERMCAT
 

Andere mochten auch (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
 

Ähnlich wie The Whole Enchilada

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 DeploymentBrett Durrett
 
Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1Solution to warsaw's crackme1.1
Solution to warsaw's crackme1.1Aodrulez
 
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 katasRachel 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In 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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 

Kürzlich hochgeladen (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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In 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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 

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