SlideShare ist ein Scribd-Unternehmen logo
1 von 48
story-driven testing
   people first, computers second.
testing can be frustrating.
testing isn’t fun.
so we don’t do it...
then things break
and users get mad.
so how do you win?
make tests automated!
get users involved!
and enforce policy.
everyone knows why
   testing is good.
and everyone has
excuses why they don’t
         test.
it’s the manager’s job to
     keep projects on
         schedule
it’s the passionate
programmer who fights
        for quality.
testing needs to be
easy (and quick) to do...
and it must be part of
    the schedule.
domain experts first
 and code second.
And I fill in "Email" with "homer@simpsons.com"
Feature: User Signup
  In order to help other people learn Rails and get help myself
                         And I press "Sign Up"
  As an interested community member
  I want to sign up
                 Then I should receive an email
Scenario: Signing up to use the system
                       When I open the email
  Given I go to the home page
    And I press "Sign up"
Then I fill in "Login" with "homer" activate your Rails Mentors
    And I should see "Please

    And I press "Sign account" in the subject
    And I fill in "Email" with "homer@simpsons.com"
                      Up"

   When I open the email click the first link in the email
           When I
   Then I should receive an email



   When I click the firstshould see "Almost done..."
              Then I link in the email
   Then I should see "Please activate your Rails Mentors account" in the subject



   When I fill in fill in "Password" with "homer_rocks"
     When I "Password" with "homer_rocks"
   Then I should see "Almost done..."



    And I press "Start in "Password Confirmation" with
         And I fill using your account!"
    And I fill in "Password Confirmation" with "homer_rocks"


                            "homer_rocks"
   Then I should be on the dashboard page
    And I should see "Your account has been activated. Welcome to Rails Mentors!"

           And I press "Start using your account!"
    And I should see "Please complete your profile!"


         Then I should be on the dashboard page
  And I should see "Your account has been activated.
                 Welcome to Rails Mentors!"
    And I should see "Please complete your profile!"
features are value-
   propositions
focus on features that
  have real business
        value.
As a...
I want to...
So that I can...
Feature: Checking grades
As a nervous student who may not graduate
I want to be able to check my grades in
real time
So that I know I will get a diploma
Given          Then
        When
scenarios describe the
   feature in detail.
Given
setups, preconditions,
    prerequisites
Given   I   am logged in as "homer"
  And   I   am a current student
  And   I   am on the My Info page
  And   I   received a grade of "C-" in "CS 462"
When



describe actions
When I click "Check my grades"
 And I select "Current term"
 And I press "View"
Then
describes outcomes
Then I should see "Grades for Homer Simpson"
 And I should see a table with "CS 462" in row 1, column 1
 And I should see a table with "C-" in row 1, column 4`
step definitions make
   this all possible.
step definitions use
Ruby code and regular
 expressions to run
       stories.
but you can run stories
 against any web-based
       application
WEBRAT
webrat is for testing
 rails applications
webrat provides
matchers for cucumber
Web
Application
Testing
In
Ruby
WATIR platforms

• Internet Explorer (Windows)
• Firefox (Windows and Mac)
• Safari (Mac)
steps to definitions
    Then I should see "Grades for Homer Simpson"




Then /I should see "(.*)"/ do |text|
  @browser.text.should include(text)
end
multiple parameters
          When I fill in "username" with "bphogan"




When /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value|
a small demo
Feature: Share code with others
  In order to help a student who is in a different state
  As a good teacher
  I want to share some code I wrote over the internet

  Scenario: Create a private paste so it won’t be found by Google
    Given I go to "http://www.pastie.org/"
      And I fill in "paste[body]" with "This is a simple test case using Cucumber"
      And I select "Plain text" from "paste_parser_id"
      And I check "paste[restricted]"
      When I press "Paste"
      Then I should see "less than a minute ago"
      When I click "Edit"
       Then I should see "This paste will be private."
stories automate a
     browser
Many more advanced
   features... but
cucumber lets you keep
 your features with the
          code
and it facilitates
   communication
between technical and
non-technical people.
you will be a hero.
then you win.
questions go to
bphopgan@gmail.com

Weitere ähnliche Inhalte

Was ist angesagt?

Hide email address in sourc...
Hide email address in sourc...Hide email address in sourc...
Hide email address in sourc...chaitanya535
 
HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018Tom Anthony
 
Command Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom PoolCommand Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom PoolTom Pool
 
I put on my mink and wizard behat
I put on my mink and wizard behatI put on my mink and wizard behat
I put on my mink and wizard behatxsist10
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Aaron Gustafson
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Thinkful
 
Mist concept introduction with notes
Mist concept introduction with notesMist concept introduction with notes
Mist concept introduction with notesEthereum
 
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Guillaume Laforge
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 

Was ist angesagt? (10)

2600 Thailand #50 From 0day to CVE
2600 Thailand #50 From 0day to CVE2600 Thailand #50 From 0day to CVE
2600 Thailand #50 From 0day to CVE
 
Hide email address in sourc...
Hide email address in sourc...Hide email address in sourc...
Hide email address in sourc...
 
HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018
 
Command Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom PoolCommand Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom Pool
 
I put on my mink and wizard behat
I put on my mink and wizard behatI put on my mink and wizard behat
I put on my mink and wizard behat
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18
 
Mist concept introduction with notes
Mist concept introduction with notesMist concept introduction with notes
Mist concept introduction with notes
 
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 

Ähnlich wie Story-driven Testing

Story Driven Development With Cucumber
Story Driven Development With CucumberStory Driven Development With Cucumber
Story Driven Development With CucumberSean Cribbs
 
I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)xsist10
 
Write Tests in End Users’ Lingo
Write Tests in End Users’ LingoWrite Tests in End Users’ Lingo
Write Tests in End Users’ LingoIndicThreads
 
Gherkin for test automation in agile
Gherkin for test automation in agileGherkin for test automation in agile
Gherkin for test automation in agileViresh Doshi
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018Berend de Boer
 
How to improve our acceptance tests - Pyccuracy VS Splinter
How to improve our acceptance tests - Pyccuracy VS SplinterHow to improve our acceptance tests - Pyccuracy VS Splinter
How to improve our acceptance tests - Pyccuracy VS SplinterFernando Sandes
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsSteve Malsam
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumberBachue Zhou
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybarafatec
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybarafatec
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Jean-Loup Yu
 
Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsKonstantin Kudryashov
 
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)Jean-Michel Garnier
 
Growing software from examples
Growing software from examplesGrowing software from examples
Growing software from examplesSeb Rose
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shineWim Selles
 
Handling Non Functional Requirements on an Agile Project
Handling Non Functional Requirements on an Agile ProjectHandling Non Functional Requirements on an Agile Project
Handling Non Functional Requirements on an Agile ProjectKen Howard
 
Testing Has Many Purposes
Testing Has Many PurposesTesting Has Many Purposes
Testing Has Many PurposesAlex Sharp
 

Ähnlich wie Story-driven Testing (20)

Story Driven Development With Cucumber
Story Driven Development With CucumberStory Driven Development With Cucumber
Story Driven Development With Cucumber
 
I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)
 
2_cucumber
2_cucumber2_cucumber
2_cucumber
 
Write Tests in End Users’ Lingo
Write Tests in End Users’ LingoWrite Tests in End Users’ Lingo
Write Tests in End Users’ Lingo
 
Gherkin for test automation in agile
Gherkin for test automation in agileGherkin for test automation in agile
Gherkin for test automation in agile
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
How to improve our acceptance tests - Pyccuracy VS Splinter
How to improve our acceptance tests - Pyccuracy VS SplinterHow to improve our acceptance tests - Pyccuracy VS Splinter
How to improve our acceptance tests - Pyccuracy VS Splinter
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot Overlords
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumber
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
 
Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projects
 
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
 
Defining Done
Defining DoneDefining Done
Defining Done
 
Growing software from examples
Growing software from examplesGrowing software from examples
Growing software from examples
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shine
 
Cucumber
CucumberCucumber
Cucumber
 
Handling Non Functional Requirements on an Agile Project
Handling Non Functional Requirements on an Agile ProjectHandling Non Functional Requirements on an Agile Project
Handling Non Functional Requirements on an Agile Project
 
Testing Has Many Purposes
Testing Has Many PurposesTesting Has Many Purposes
Testing Has Many Purposes
 

Mehr von Brian Hogan

Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoBrian Hogan
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleBrian Hogan
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Getting Started Contributing To Open Source
Getting Started Contributing To Open SourceGetting Started Contributing To Open Source
Getting Started Contributing To Open SourceBrian Hogan
 
Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With ElmBrian Hogan
 
Testing Client-side Code with Jasmine and CoffeeScript
Testing Client-side Code with Jasmine and CoffeeScriptTesting Client-side Code with Jasmine and CoffeeScript
Testing Client-side Code with Jasmine and CoffeeScriptBrian Hogan
 
FUD-Free Accessibility for Web Developers - Also, Cake.
FUD-Free Accessibility for Web Developers - Also, Cake.FUD-Free Accessibility for Web Developers - Also, Cake.
FUD-Free Accessibility for Web Developers - Also, Cake.Brian Hogan
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignBrian Hogan
 
Web Development with CoffeeScript and Sass
Web Development with CoffeeScript and SassWeb Development with CoffeeScript and Sass
Web Development with CoffeeScript and SassBrian Hogan
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into WordsBrian Hogan
 
HTML5 and CSS3 Today
HTML5 and CSS3 TodayHTML5 and CSS3 Today
HTML5 and CSS3 TodayBrian Hogan
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexBrian Hogan
 
Stop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard LibraryStop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard LibraryBrian Hogan
 
Make GUI Apps with Shoes
Make GUI Apps with ShoesMake GUI Apps with Shoes
Make GUI Apps with ShoesBrian Hogan
 
Learning To Walk In Shoes
Learning To Walk In ShoesLearning To Walk In Shoes
Learning To Walk In ShoesBrian Hogan
 
Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Brian Hogan
 

Mehr von Brian Hogan (18)

Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Docker
DockerDocker
Docker
 
Getting Started Contributing To Open Source
Getting Started Contributing To Open SourceGetting Started Contributing To Open Source
Getting Started Contributing To Open Source
 
Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With Elm
 
Testing Client-side Code with Jasmine and CoffeeScript
Testing Client-side Code with Jasmine and CoffeeScriptTesting Client-side Code with Jasmine and CoffeeScript
Testing Client-side Code with Jasmine and CoffeeScript
 
FUD-Free Accessibility for Web Developers - Also, Cake.
FUD-Free Accessibility for Web Developers - Also, Cake.FUD-Free Accessibility for Web Developers - Also, Cake.
FUD-Free Accessibility for Web Developers - Also, Cake.
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Web Development with CoffeeScript and Sass
Web Development with CoffeeScript and SassWeb Development with CoffeeScript and Sass
Web Development with CoffeeScript and Sass
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
 
HTML5 and CSS3 Today
HTML5 and CSS3 TodayHTML5 and CSS3 Today
HTML5 and CSS3 Today
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
 
Stop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard LibraryStop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard Library
 
Make GUI Apps with Shoes
Make GUI Apps with ShoesMake GUI Apps with Shoes
Make GUI Apps with Shoes
 
The Why Of Ruby
The Why Of RubyThe Why Of Ruby
The Why Of Ruby
 
Learning To Walk In Shoes
Learning To Walk In ShoesLearning To Walk In Shoes
Learning To Walk In Shoes
 
Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009
 

Kürzlich hochgeladen

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Kürzlich hochgeladen (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Story-driven Testing

Hinweis der Redaktion

  1. We’re going to tlk about story-driven testing with Cucumber.
  2. Testing web apps can be frustrating because there are so many places where things can go wrong. Most developers test web sites by running users through the application, but the manual clicking can take time.
  3. Developers would rather be coding new features, and users would rather have a product that works well and not have their time wasted doing the developer’s job for them.
  4. We don’t do things that are hard and not fun. It’s just human nature. We just kind of hide and pretend they’re not problems.
  5. Unfortunately, this leads to shipping bad software.
  6. ...then the support calls come, and the angry emails, and the displeased shareholders.
  7. Obviously there has to be some kind of workable solution, but what is it?
  8. We can make the work easy by automating things. We spend so much time as developers automating processes for our clients that we never stop to think about how we might do that for ourselves and our processes.
  9. We can reduce some of our work if we can get the users involved in a real way.
  10. Finally, in order for this to work, management has to enforce testing practices. Applications have to be shipped with good test coverage, and time estimates must include the time it takes to write tests.
  11. Everyone knows testing isn’t a waste of time. We may argue on how to do it, but everyone does some level of testing as they develop.
  12. Unfortunately, every single developer can come up with a list of excuses why they don’t test enough. Usually they blame management or marketing for pushing deadlines.
  13. Management has to make deadlines or stuff doesn’t get done, and they have outside forces pressuring them to deliver results.
  14. Programmers know that if they rush, they’re going to do crappy work and while deadlines may be met in the short term, what is the cost of the technical debt incurred? Bad code needs to be addressed at some point. A professioal craftsman strives for quality.
  15. So we have to be able to test quickly and easily
  16. and we have to allow time to make it happen
  17. and we can achieve some of this with Cucumber, a testing framework designed with the user experience in mind.
  18. This scenario is written using Gherkin, Cucumber’s language for describing user interactions. It’s easy to read and easy to understand. You can sit down with your end users and write these scnearios together and then later use them to test your real application.
  19. When thinking about a feature, you and your user must think about what value the feature has.
  20. Ask yourselves “why do we need this feature? How will having this feature benefit a user?” The user might be a system administrator, a site owner, a basic user, or an anonymous guest, but you should only think about features that directly impact a user.
  21. A feature can best be described by filling in these blanks: “As a somebody, I want to do something, so that I can do something else. “
  22. “As a nervous student who may not graduate, I want to be able to check my grades in real time so that I know I will get a diploma” is definitely focused on the user.
  23. You describe a scenario using “given, when, then”.
  24. The scenario describes the feature in more details, explaining how a user will move through the application to achieve the feature’s goal.
  25. “Given” steps explain the prerequisites for the test. They let you specify any setup conditions that must have occurred outside of the process.
  26. Given I am logged in as “homer” And I am a current student And I am on the My Info page and I recived a grade of “C-” in “CS 462”
  27. “When” steps describe what you do during the scenario
  28. When I click “Check my grades And I select “Current Term” And I press “View”
  29. “Then” steps describe the outcome you expect.
  30. Then I should see “Grades for Homer Simpson” And I should see a table with “CS 462” in row 1, column 1 And I should see a table with “C-” in row 1 column 4
  31. Step definitions map these sentences to actual code.
  32. We use Ruby and regular expressions to process each line in the story.
  33. Even though we write these definitions in Ruby code, you can run Cucumber against anything that shows up in your browser, including Flash!
  34. One popular way to run Cucumber stories is with WEBRAT. It’s a library mainly used in Rails applications to run a Ruby-based browser.
  35. When you install webrat, you get a bunch of ready-made matchers for common tasks like finding items on a page, filling in forms, clicking links, and pressing buttons
  36. WATIR, or “Web Application Testing In Ruby” automates Internet Explorer or Firefox and works well with Cucumber.
  37. Steps are mapped by using regular expression capture values. The captured values can then be used in the step.
  38. You can use multiple parameters too.
  39. A small demo automating Pastie.
  40. So, stories automate a browser
  41. there are many more advanced features of Cucumber though.
  42. One major advantage of this is that your features stay with your code. They stay fresh, and they change as your code changes. A new developer can look at these features, run them, and know exactly what the application does.
  43. Your non-technical stakeholders, management, and other parties can easily communicate with the developers about features.
  44. If you can get features that are well thought out, well planned, and well communicated in front of your developers so they can implement them, you’ll be a hero.
  45. That’s how you win.