SlideShare uma empresa Scribd logo
1 de 34
Testing is fun
     A developer's perspective
blogger:    http://gouravtiwari.blogspot.com


 github:    http://github.com/gouravtiwari21


  email:    gouravtiwari21@gmail.com
            g.tiwari@tcs.com


 twitter:   @gouravtiwari21
1. Why something is fun?

2. Unit, functional and Acceptance
   testing – fun with Ruby on Rails

3. Quality Tests
Testers Vs. Developers: Code War
Testers + Developers = Quality Product
Fun is like beauty - it's in the eyes of the beholder
Why something is fun?
1. Why something is fun?




   Problem solving

   Pattern recognition

   Creativity and lateral thinking
1. Why something is fun?



                    My Nephews and Nieces
1. Why something is fun?




Why a kid hate something?
   Feeling of burden and boredom
   Patience test

   Tough to do
1. Why something is fun?




Why a kid like something?
   Curiosity and involvement
   Sense of accomplishment

   Easy to do and easy to iterate
1. Why something is fun?



                           My Perspective
1. Why something is fun?




No, testing is not fun,
WHEN
    This works on my development box!

    Workbench-mess

    Slow Tests
1. Why something is fun?




Yes, I want to do it
WHEN
    Use right tools and right test data

    Clean Workbench

    Run tests – every 30 secs!
Unit, functional and Acceptance testing –
                  fun with Ruby on Rails
2. Unit, functional and Acceptance testing - fun with Ruby on Rails



         (Development + Testing) Approach ?




Bottom-up (Inside-out)                                             Top-down (Outside-in)
2. Unit, functional and Acceptance testing - fun with Ruby on Rails




Cucumber & RSpec
  Outside-in approach

  Only write what is meaningful

  Close interaction of PO and developer
2. Unit, functional and Acceptance testing - fun with Ruby on Rails




                                            BDD


        ATDD                                                            TDD


        BA/PO                                                         Developer
2. Unit, functional and Acceptance testing - fun with Ruby on Rails



                               Cucumber example
2. Unit, functional and Acceptance testing - fun with Ruby on Rails



                                          Outside-in


    Scenario                                   View                     Controller
          Step 1                                 Step 3                       Step 4




        Steps                                                              Model
          Step 2                                                              Step 5


Given                                                                 Pre-requisite
…                                                                     (masked data, mock, Stub)
                                                                      …
When
…                                                                     Action
                                                                      (invoke method)
Then
                                                                      …
…
                                                                      Validate output
                                                                      …
2. Unit, functional and Acceptance testing - fun with Ruby on Rails



                                  Tests with guard
Courtesy: https://github.com/visionmedia/git-extras
Patience test with cucumber
   100 tests & 1 sprint … a trivial example
Quality tests
Team testing time
  With friends and family
3. Quality tests




                   Metric Fu
3. Quality tests



                   Reek
3. Quality tests



                   Rcov
3. Quality tests



                   Flog
Easy to understand and easy to
follow steps are fun


With checks on code and code
quality, developer can have
sound sleep

ATDD, TDD and
BDD, DDD, anyother DD :
just concepts

development and testing
together is fun!
https://joind.in/6023
https://github.com/cucumber/cucumber/wiki/
http://www.thewebsqueeze.com/web-design-articles/the-
mac-ruby-developers-toolkit-25-essential-apps.html
http://rspec.info/
http://guides.rubyonrails.org/testing.html
http://metric-fu.rubyforge.org/
http://www.julianhermida.com/algoma/scotlteachingreso
urcesfeedback.htm

Mais conteúdo relacionado

Semelhante a Testing is Fun @Confoo.ca 2012

How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay Europe
Michael Palotas
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
Marcos Quesada
 
Testing Zen
Testing ZenTesting Zen
Testing Zen
day
 
Rapid RIA development with Netzke
Rapid RIA development with NetzkeRapid RIA development with Netzke
Rapid RIA development with Netzke
netzke
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UI
Vladimir Tsukur
 

Semelhante a Testing is Fun @Confoo.ca 2012 (20)

ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay Europe
 
Test Driven Development via Agile Testing
Test Driven Development via Agile TestingTest Driven Development via Agile Testing
Test Driven Development via Agile Testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Disconnecting the Database with ActiveRecord
Disconnecting the Database with ActiveRecordDisconnecting the Database with ActiveRecord
Disconnecting the Database with ActiveRecord
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
Test pyramid in an Android Agile Project - TDC2013
Test pyramid in an Android Agile Project - TDC2013Test pyramid in an Android Agile Project - TDC2013
Test pyramid in an Android Agile Project - TDC2013
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Acceptance tests
Acceptance testsAcceptance tests
Acceptance tests
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
Puppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven DevelopmentPuppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven Development
 
20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-paris20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-paris
 
Testing Zen
Testing ZenTesting Zen
Testing Zen
 
Rapid RIA development with Netzke
Rapid RIA development with NetzkeRapid RIA development with Netzke
Rapid RIA development with Netzke
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UI
 
ruby test-all parallel running
ruby test-all parallel runningruby test-all parallel running
ruby test-all parallel running
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 

Testing is Fun @Confoo.ca 2012