SlideShare a Scribd company logo
1 of 135
Download to read offline
Test Driven Development
                               Embrace Uncertainty



                                 Naresh Jain
                              Twitter: @nashjain
                          http://blogs.agilefaqs.com
                            Licensed Under Creative Commons by Naresh Jain
Friday, October 2, 2009                                                      1
TDD Rhythm
                          Test, Code, Refactor




Friday, October 2, 2009                          2
TDD Rhythm
                          Test, Code, Refactor
                                 Add a Test




Friday, October 2, 2009                          2
TDD Rhythm
                          Test, Code, Refactor
                                  Add a Test



                                 Run the Test




Friday, October 2, 2009                          2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test




Friday, October 2, 2009                              2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                             Fail




Friday, October 2, 2009                              2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change




Friday, October 2, 2009                               2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change


                                      Run the Test




Friday, October 2, 2009                               2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test




Friday, October 2, 2009                                      2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test
                                               Pass




Friday, October 2, 2009                                      2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test
                                               Pass

                                        Refactor




Friday, October 2, 2009                                      2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test
                                               Pass

                                        Refactor




Friday, October 2, 2009                                      2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test
                                               Pass

                                        Refactor




Friday, October 2, 2009                                      2
TDD Rhythm
                          Test, Code, Refactor
                                       Add a Test

                               Pass
                                      Run the Test

                                              Fail

                                      Make a little
                                        change

                                                      Fail
                                      Run the Test
                                               Pass

                                        Refactor




Friday, October 2, 2009                                      2
But....


Friday, October 2, 2009             3
rk?                                 e?
                                         Ho                         a Wo                             m   her
                                           wt
                                                  oS           E xtr                          probl
                                                                                                    e
                                                    tar                                   a
                                                          t?                       th ere
                            Wh                                                Is
                                o? W
                                         hen
                                              ?

                                                                                   ROI?
                          Pro
                             duc
                                 tivit
                                         y?




Friday, October 2, 2009                                                                                          3
Continuum


Friday, October 2, 2009               4
Friday, October 2, 2009   5
Post Agile




                          New to Agile


Friday, October 2, 2009                  5
Post Agile



          Expert TDD
                                         New to TDD
          Practitioners




                          New to Agile


Friday, October 2, 2009                               5
Me


Friday, October 2, 2009        6
Friday, October 2, 2009   7
Mumbai
Friday, October 2, 2009            8
Friday, October 2, 2009   9
Friday, October 2, 2009   10
We don’t travel like this




Friday, October 2, 2009                      11
We are getting there...




Friday, October 2, 2009                         12
Tech Talks!




Friday, October 2, 2009                 13
Friday, October 2, 2009   14
Friday, October 2, 2009   15
Friday, October 2, 2009   16
Warmup Scenario


Friday, October 2, 2009              17
Friday, October 2, 2009   18
Pick one scenario and in relation to your scenario, what are the
           specific observable results that will tell you that the activity has
           been successfully completed?




Friday, October 2, 2009                                                          18
Pick one scenario and in relation to your scenario, what are the
           specific observable results that will tell you that the activity has
           been successfully completed?

                 Going out for Movie (THX sound and Digital projection)




Friday, October 2, 2009                                                          18
Pick one scenario and in relation to your scenario, what are the
           specific observable results that will tell you that the activity has
           been successfully completed?

                 Going out for Movie (THX sound and Digital projection)
                 Going out for meal (one veg.)




Friday, October 2, 2009                                                          18
Pick one scenario and in relation to your scenario, what are the
           specific observable results that will tell you that the activity has
           been successfully completed?

                 Going out for Movie (THX sound and Digital projection)
                 Going out for meal (one veg.)
                 Going shopping ($50)
                                                                          [10 Minutes]




Friday, October 2, 2009                                                                  18
Pick one scenario and in relation to your scenario, what are the
           specific observable results that will tell you that the activity has
           been successfully completed?

                 Going out for Movie (THX sound and Digital projection)
                 Going out for meal (one veg.)
                 Going shopping ($50)
                                                                                [10 Minutes]

                Present back to the group your findings. [3 minutes per group]




Friday, October 2, 2009                                                                        18
Acceptance Criteria
                              and Tests
                              A critical piece of Agile




Friday, October 2, 2009                                   19
Acceptance Criteria
                Is a set of conditions that the Story must meet for it to be accepted
                as complete
                Is typically provided by the customer or product owner.


                            Is not a replacement for conversation.
                           Is one of the results of the conversation


                             Acceptance Criteria are NOT tests



Friday, October 2, 2009                                                                 20
Given [Precondition]

                          When [Actor + Action]

                          Then [Observable Result]




Friday, October 2, 2009                              21
Acceptance Criteria

                          Examples (data + scenarios)


                                    Acceptance Tests


Friday, October 2, 2009                                 22
Acceptance Criteria

               + Examples (data + scenarios)


                            Acceptance Tests


Friday, October 2, 2009                         22
Demo
                          Roman Numerals to Decimal Conversion Example




Friday, October 2, 2009                                                  23
1 May               1 Jul               1 Sep          1 Nov

                           Analysis

                                               Design

                                                               Implementation
                                               ERD
                                 DFD
                                                     DD
                                                          ST




Friday, October 2, 2009                                                           24
Business Facing




                          Are we building the right product?




                          Are we building the product right?


                               Technology/Implementation Facing




Friday, October 2, 2009                                           25
Brian Marick’s
                                      Test Categorization
                                                   Business Facing
               Supports Programming




                                                                              Critique product
                                           Technology/Implementation Facing




Friday, October 2, 2009                                                                          26
It Helps to think...
                                           Business Facing
         Drives Development




                                                                     Critique product
                                  Technology/Implementation Facing




Friday, October 2, 2009                                                                 27
It Helps to think...
                                                 Business Facing
         Drives Development




                                                                           Critique product
                              Unit Testing


                                        Technology/Implementation Facing




Friday, October 2, 2009                                                                       27
It Helps to think...
                                                    Business Facing



                              Acceptance Testing
         Drives Development




                              Low-fi prototypes




                                                                              Critique product
                                 Unit Testing


                                           Technology/Implementation Facing




Friday, October 2, 2009                                                                          27
It Helps to think...
                                                    Business Facing



                              Acceptance Testing                  Exploratory Testing
         Drives Development




                              Low-fi prototypes                   UI and Usability Testing




                                                                                            Critique product
                                 Unit Testing


                                           Technology/Implementation Facing




Friday, October 2, 2009                                                                                        27
It Helps to think...
                                                    Business Facing



                              Acceptance Testing                  Exploratory Testing
         Drives Development




                              Low-fi prototypes                   UI and Usability Testing




                                                                                            Critique product
                                                                      Performance Testing
                                 Unit Testing
                                                                          System Tests

                                           Technology/Implementation Facing




Friday, October 2, 2009                                                                                        27
Acceptance Test Driven




Friday, October 2, 2009                    28
Acceptance Test Driven


        Story




Friday, October 2, 2009                    28
Acceptance Test Driven

                          Acceptance
                           Criteria


        Story




Friday, October 2, 2009                    28
Acceptance Test Driven
                                       Iteration



                          Acceptance
                           Criteria


        Story




Friday, October 2, 2009                            28
Acceptance Test Driven
                                         Iteration
                                       Automated
                                       Acceptance
                          Acceptance      Tests
                           Criteria


        Story




Friday, October 2, 2009                              28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance
                          Acceptance               Tests
                           Criteria

                                   Automated
        Story                       Unit Test




Friday, October 2, 2009                                       28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance
                          Acceptance               Tests
                           Criteria

                                   Automated
        Story                       Unit Test



                                                Automated
                                                Acceptance
                                                   Tests




Friday, October 2, 2009                                       28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance
                          Acceptance               Tests
                           Criteria

                                   Automated
        Story                       Unit Test



                                                Automated
                                                Acceptance
                                                   Tests

                                                Exploratory
                                                  Testing




Friday, October 2, 2009                                       28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance
                          Acceptance               Tests
                           Criteria

                                   Automated
        Story                       Unit Test



                                                Automated
                                                Acceptance
                                                   Tests
                                                              Acceptance
                                                Exploratory    Criteria
                                                  Testing




Friday, October 2, 2009                                                    28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance
                          Acceptance               Tests
                           Criteria

                                   Automated
        Story                       Unit Test
                                                              Automated
                                                               UI Tests


                                                Automated
                                                Acceptance
                                                   Tests
                                                              Acceptance
                                                Exploratory    Criteria
                                                  Testing




Friday, October 2, 2009                                                    28
Acceptance Test Driven
                                                  Iteration
                                                Automated
                                                Acceptance                 P
                          Acceptance               Tests                   E
                           Criteria                                        R
                                                                           F
                                                                           O
                                   Automated                               R
        Story                       Unit Test                              M   T
                                                              Automated    E   E
                                                               UI Tests    N   S
                                                                           C   T
                                                                           E   S
                                                Automated
                                                Acceptance
                                                   Tests
                                                              Acceptance
                                                Exploratory    Criteria
                                                  Testing




Friday, October 2, 2009                                                            28
Mike Cohn’s Testing Pyramid




Friday, October 2, 2009           29
Mike Cohn’s Testing Pyramid
                          GUI
                          Tests




Friday, October 2, 2009           29
Mike Cohn’s Testing Pyramid
                                                 Small in Number
                          GUI     Tools: Selenium, Sahi, Watir, Abbot, Frankenstein
                          Tests




Friday, October 2, 2009                                                               29
Mike Cohn’s Testing Pyramid
                                                      Small in Number
                             GUI       Tools: Selenium, Sahi, Watir, Abbot, Frankenstein
                             Tests

                          Acceptance
                             Tests




Friday, October 2, 2009                                                                    29
Mike Cohn’s Testing Pyramid
                                                      Small in Number
                             GUI       Tools: Selenium, Sahi, Watir, Abbot, Frankenstein
                             Tests

                          Acceptance                At least one per story
                                            Tools: Fit, FitNesse, RSpec, Cucumber
                             Tests




Friday, October 2, 2009                                                                    29
Mike Cohn’s Testing Pyramid
                                                      Small in Number
                             GUI       Tools: Selenium, Sahi, Watir, Abbot, Frankenstein
                             Tests

                          Acceptance                At least one per story
                                            Tools: Fit, FitNesse, RSpec, Cucumber
                             Tests



                          Unit Tests




Friday, October 2, 2009                                                                    29
Mike Cohn’s Testing Pyramid
                                                      Small in Number
                             GUI       Tools: Selenium, Sahi, Watir, Abbot, Frankenstein
                             Tests

                          Acceptance                At least one per story
                                            Tools: Fit, FitNesse, RSpec, Cucumber
                             Tests

                                                   At least one per class or module
                                                         Tools: xUnit, TestNG
                          Unit Tests




Friday, October 2, 2009                                                                    29
Acceptance Tests                          View


                                                                   UI
                                             Model and Presenter




                                               Business Tier




                                                Data Store



Friday, October 2, 2009                                                    30
Why care about TDD?



Friday, October 2, 2009                     31
Friday, October 2, 2009   32
# of Lines of Code?



Friday, October 2, 2009                         33
# of Story Points
                            (estimates)?


Friday, October 2, 2009                       34
Friday, October 2, 2009   35
# of Features developed?



Friday, October 2, 2009               35
# of Features tested?



Friday, October 2, 2009            35
# of Features deployed?



Friday, October 2, 2009              35
# of Features used actively?



Friday, October 2, 2009                  35
What about Maintenance?



Friday, October 2, 2009             36
Stay away from (time
                            hungry) debugger


Friday, October 2, 2009                          37
Manual (monkey)
                          Checking by
                      Developers and Tester


Friday, October 2, 2009                       38
Maintain Focus



Friday, October 2, 2009                    39
Reduce Wastage: Hand Overs



Friday, October 2, 2009   40
Communication




Friday, October 2, 2009                   41
Living, up-to-date
                             specification


Friday, October 2, 2009                        42
Communicate Design
                             Decisions


Friday, October 2, 2009                        43
Learning:
                          Listen to your code


Friday, October 2, 2009                         44
Baby Steps:
                          Slow down and think


Friday, October 2, 2009                         45
Confidence




Friday, October 2, 2009               46
Testable Code by Design
                    + Safety Net


Friday, October 2, 2009                 47
Loosely Coupled Design



Friday, October 2, 2009                  48
Refactoring



Friday, October 2, 2009                 49
Test Driven Design
                            Before you take the plunge




Friday, October 2, 2009                                  50
Evolutionary Design



Friday, October 2, 2009                         51
System Metaphor



Friday, October 2, 2009                     52
Thin Slicing



Friday, October 2, 2009                  53
Interaction Design



Friday, October 2, 2009                        54
Tracer Bullets



Friday, October 2, 2009                    55
Avatars of TDD
                                     Rule of Diversity
                          Distrust all claims for “One True Way”




Friday, October 2, 2009                                            56
Business Facing
  Drives Development




                                                                          Critique product
                                       Inside Out




                          Outside In

                                       Technology/Implementation Facing


                                   Brian Marick’s Test Categorization



Friday, October 2, 2009                                                                      57
Veterinarian
                          Information System



Friday, October 2, 2009                        58
Outside In: ATDD
   Fitnesse Document:
   Assertions: 17 right, 0 wrong, 0 ignored, 0 exceptions


  com.vis.billing.fixtures.PaidCashBill

                                                                     procedure details on the bill
  account details
                                                                     name                     cost
  account number patient name owner name
                                                                     Routine Office Visit     250
  1001                    Fluffy      Dave Atkins
                                                                     Rabies Vaccination       50
  procedure details
                                           pay           Cash
  name                        cost
                                           patient name? owner name? account number? bill no? payment method? amount paid?
  Routine Office Visit 250
                                           Fluffy        Dave Atkins 1001               1        Cash         300
  Rabies Vaccination          50

  bill                                                                 check paid true
  account number? owner name? patient name? total? paid?
  1001                    Dave Atkins Fluffy        300 false           check    total 0




Friday, October 2, 2009                                                                                                      59
Outside In: Output




Friday, October 2, 2009                        60
ATDD: Another Example
                          Acceptance test:
                          class FluffyTest < Test::Unit::TestCase
                            def test_examination_and_shots
                              vet = Veterinarian.new
                              clinic = Clinic.new "Main Line health"
                              dave = Owner.new "Dave"
                              fluffy = Patient.new "Fluffy"
                              dave.has fluffy
                              visit = clinic.visit(fluffy, vet) do |v|
                                v.procedure "Rabies vaccination", 50
                              end

                              invoice = visit.invoice
                              assert_equal invoice.to_s,
                                                           <<-INVOICE
                                                           Routine visit: $200
                                                           Rabies vaccination: $50
                                                           Total: $250
                                                           INVOICE

                              receipt = clinic.pay_for visit, 100

                              assert_equal receipt.to_s,
                                                           <<-RECEIPT
                                                           Paid $100 for Routine visit
                                                           Paid $0 for Rabies vaccination
                                                           Outstanding: $150
                                                           RECEIPT
                            end
                          end



Friday, October 2, 2009                                                                     61
Outside In: Output




Friday, October 2, 2009                        62
Inside Out: Unit TDD
     public class ClinicTest {
       private Clinic clinic = new Clinic();

       @Test                                                                                public class BillableTest {
       public void amountOnTheReceiptShouldMatchBillableAmount() throws Exception {
          Billable billable = new Billable() {                                                private static final Account daveSAccount = new Account(101, "Dave");
             public int totalAmount() { return 0; }                                           private static final List<Service> services = new ArrayList<Service>();
          };
          Account dave = new Account(101, "Dave");                                            @Test
                                                                                              public void totalBillableAmountShouldBeZeroIfNoServicesAreProvided() {
          Receipt rcpt = clinic.payCash(dave, billable);                                         Billable bill = new Bill(daveSAccount, services);
          assertEquals("Amount on receipt does match procedure cost", billable.totalAmount(),    assertEquals("Total amount is not Zero", 0, bill.totalAmount());
     rcpt.getAmount());                                                                       }
         }
                                                                                                  @Test
         @Test                                                                                    public void totalBillableAmountShouldBeTotalOfEachServiceProvided() {
         public void customerPayesBillableAmountForCashTransaction() throws Exception {             services.add(new Procedure("Rabies Vaccination", 250));
           final int billableAmount = 56;                                                           services.add(new Procedure("Regular office Visit", 50));
           class AmountCharged { int charged; };
           final AmountCharged charged = new AmountCharged();                                         Billable bill = new Bill(daveSAccount, services);

             Billable billable = new Billable() {                                                     assertEquals("Total Amount is not 300", 300, bill.totalAmount());
                public int totalAmount() {                                                        }
                  return billableAmount;
                }                                                                                 @After
             };                                                                                   public void cleanUp() {
                                                                                                    services.clear();
             Account dave = new Account(101, "Dave") {                                            }
                public void charge(int amount) {                                              }
                  charged.charged = amount;
                }
             };

             clinic.payCash(dave, billable);
             assertEquals("Account is not charged billable amount", billableAmount,charged.charged);
         }
     }
Friday, October 2, 2009                                                                                                                                                   63
Inside Out: Output




Friday, October 2, 2009                        64
Inside Out: Another Example
  public class ChargeAccountForServices {
    private static final Billable bill = createMock(Billable.class);
    private static final Accountable account = createMock(Accountable.class);
    private static final Clinic clinic = new Clinic();

     @Before
     public void setUp() {
       reset(account);                              @Test
       reset(bill);                                    public void shouldHaveZeroAmountDueOnReceiptIfCompletePaymentIsMade() {
     }                                                   expect(bill.amount()).andReturn(300);
                                                         replay(bill);
     @Test                                               Receipt receipt = clinic.pay(300, bill, account);
     public void shouldMakePaymentsAgainstAnAccount() { verify(bill);
       account.paid(bill);                               assertEquals(300, receipt.amount());
       replay(account);                                  assertEquals(0, receipt.amountDue());
       clinic.pay(300, bill, account);                 }
       verify(account);
     }                                                 @Test
                                                       public void shouldDisplayAmountDueOnTheReceiptIfIncompletePaymentIsMade() {
                                                         expect(bill.amount()).andReturn(500);
                                                         replay(bill);
                                                         Receipt receipt = clinic.pay(300, bill, account);
                                                         verify(bill);
                                                         assertEquals(300, receipt.amount());
                                                         assertEquals(200, receipt.amountDue());
                                                       }
                                                    }



Friday, October 2, 2009                                                                                                          65
public class CreateBillForClientAccount {
     private static final List<Service> services = new ArrayList<Service>();
     private static final Accountable account = createMock(Accountable.class);
     private Bill bill;

      @Before
      public void setUp() {
        reset(account);
      }

      @Test
      public void shouldThrowExceptionIfAccountIsNotDueForPayment() { @Test
        expect(account.isPaymentDue()).andReturn(false);               public void shouldCreateABillWithTheTotalCostOfAllTheServices() {
        replay(account);                                                 IMocksControl control = createControl();
        try {                                                            Service rabiesVaccination = control.createMock(Service.class);
           new Bill(account, null);                                      Service routineVisit = control.createMock(Service.class);
        } catch (NoPaymentDueException e) {                              services.add(rabiesVaccination);
           // expected                                                   services.add(routineVisit);
        }
                                                                         expect(account.isPaymentDue()).andReturn(true);
        verify(account);
                                                                         expect(account.unpaidServices()).andReturn(services);
      }                                                                  bill();

      @After                                                                      expect(rabiesVaccination.cost()).andReturn(250);
      public void cleanUp() {                                                     expect(routineVisit.cost()).andReturn(50);
        services.clear();
      }                                                                           control.replay();

                                                                                  assertEquals(300, bill.amount());
                                                                                  control.verify();
                                                                              }

                                                                              private void bill() throws NoPaymentDueException {
                                                                                 replay(account);
                                                                                 bill = new Bill(account, null);
                                                                                 verify(account);
                                                                              }
                                                                          }

Friday, October 2, 2009                                                                                                                    66
Inside Out: Output




Friday, October 2, 2009                        67
Coffee Vending Machine
                          How would you develop it?




Friday, October 2, 2009                               68
Feedback



Friday, October 2, 2009              69
Friday, October 2, 2009   70
Friday, October 2, 2009   71
Friday, October 2, 2009   72
Visualizing Proficiency
                             Industrial Logic’s
                                e-learning
                             Automated Analysis of Lab Exercises
                             http://industriallogic.com/elearning/




Friday, October 2, 2009                                              73
Friday, October 2, 2009   74
Friday, October 2, 2009   75
Friday, October 2, 2009   76
Friday, October 2, 2009   77
Friday, October 2, 2009   78
Friday, October 2, 2009   79
Tools & Practices


Friday, October 2, 2009                   80
Pair Programming



Friday, October 2, 2009                      81
Continuous Integration



Friday, October 2, 2009                     82
Friday, October 2, 2009   83
Coding Convention
                                   +
                          Static Code Analysis


Friday, October 2, 2009                          84
Checkstyle




Friday, October 2, 2009   85
Code Coverage



Friday, October 2, 2009                   86
Cobertura




Friday, October 2, 2009               87
DB Management



Friday, October 2, 2009                   88
Migrate4j
                          Bering



Friday, October 2, 2009                        89
Questions?

                          naresh@agilefaqs.com

Friday, October 2, 2009                          90

More Related Content

Viewers also liked

The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red SocietyNaresh Jain
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)Directi Group
 
Refactoring Fest
Refactoring FestRefactoring Fest
Refactoring FestNaresh Jain
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentNaresh Jain
 
Continuous Deployment Demystified
Continuous Deployment DemystifiedContinuous Deployment Demystified
Continuous Deployment DemystifiedNaresh Jain
 
Managing Iterations
Managing IterationsManaging Iterations
Managing IterationsNaresh Jain
 
Distributed Agile
Distributed AgileDistributed Agile
Distributed AgileNaresh Jain
 
Agile Is the New Waterfall
Agile Is the New WaterfallAgile Is the New Waterfall
Agile Is the New WaterfallNaresh Jain
 
XP And Scrum Practices
XP And Scrum PracticesXP And Scrum Practices
XP And Scrum PracticesNaresh Jain
 
Agile Maintenance
Agile MaintenanceAgile Maintenance
Agile MaintenanceNaresh Jain
 
Evolution Of Team Interaction Models
Evolution Of Team Interaction ModelsEvolution Of Team Interaction Models
Evolution Of Team Interaction ModelsNaresh Jain
 
Software Development The Trekkers Way
Software Development The Trekkers WaySoftware Development The Trekkers Way
Software Development The Trekkers WayNaresh Jain
 
Waterfall to Agile Demo
Waterfall to Agile DemoWaterfall to Agile Demo
Waterfall to Agile DemoNaresh Jain
 
Offshore Agile Maintenance
Offshore Agile MaintenanceOffshore Agile Maintenance
Offshore Agile MaintenanceNaresh Jain
 
Pair Programming
Pair ProgrammingPair Programming
Pair ProgrammingNaresh Jain
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Zohirul Alam Tiemoon
 

Viewers also liked (20)

Agile Overview
Agile OverviewAgile Overview
Agile Overview
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red Society
 
MVP Hacks
MVP HacksMVP Hacks
MVP Hacks
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)
Our Journey Down the Yellow Brick Road (Agile Adoption @ Directi)
 
Refactoring Fest
Refactoring FestRefactoring Fest
Refactoring Fest
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Continuous Deployment Demystified
Continuous Deployment DemystifiedContinuous Deployment Demystified
Continuous Deployment Demystified
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Managing Iterations
Managing IterationsManaging Iterations
Managing Iterations
 
Distributed Agile
Distributed AgileDistributed Agile
Distributed Agile
 
Agile Is the New Waterfall
Agile Is the New WaterfallAgile Is the New Waterfall
Agile Is the New Waterfall
 
XP And Scrum Practices
XP And Scrum PracticesXP And Scrum Practices
XP And Scrum Practices
 
Agile Maintenance
Agile MaintenanceAgile Maintenance
Agile Maintenance
 
Evolution Of Team Interaction Models
Evolution Of Team Interaction ModelsEvolution Of Team Interaction Models
Evolution Of Team Interaction Models
 
Software Development The Trekkers Way
Software Development The Trekkers WaySoftware Development The Trekkers Way
Software Development The Trekkers Way
 
Waterfall to Agile Demo
Waterfall to Agile DemoWaterfall to Agile Demo
Waterfall to Agile Demo
 
Offshore Agile Maintenance
Offshore Agile MaintenanceOffshore Agile Maintenance
Offshore Agile Maintenance
 
Pair Programming
Pair ProgrammingPair Programming
Pair Programming
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
 

More from Naresh Jain

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignNaresh Jain
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteNaresh Jain
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational ResilienceNaresh Jain
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming CodeNaresh Jain
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference SummaryNaresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 ConferenceNaresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 ConferenceNaresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 ConferenceNaresh Jain
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingNaresh Jain
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniNaresh Jain
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniNaresh Jain
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarNaresh Jain
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppNaresh Jain
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdNaresh Jain
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Naresh Jain
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNaresh Jain
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016Naresh Jain
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 ConferenceNaresh Jain
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTNaresh Jain
 

More from Naresh Jain (20)

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
The Eclipse Way
The Eclipse WayThe Eclipse Way
The Eclipse Way
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
 

Recently uploaded

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

TDD Overview

  • 1. Test Driven Development Embrace Uncertainty Naresh Jain Twitter: @nashjain http://blogs.agilefaqs.com Licensed Under Creative Commons by Naresh Jain Friday, October 2, 2009 1
  • 2. TDD Rhythm Test, Code, Refactor Friday, October 2, 2009 2
  • 3. TDD Rhythm Test, Code, Refactor Add a Test Friday, October 2, 2009 2
  • 4. TDD Rhythm Test, Code, Refactor Add a Test Run the Test Friday, October 2, 2009 2
  • 5. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Friday, October 2, 2009 2
  • 6. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Friday, October 2, 2009 2
  • 7. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Friday, October 2, 2009 2
  • 8. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Run the Test Friday, October 2, 2009 2
  • 9. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Friday, October 2, 2009 2
  • 10. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Pass Friday, October 2, 2009 2
  • 11. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Pass Refactor Friday, October 2, 2009 2
  • 12. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Pass Refactor Friday, October 2, 2009 2
  • 13. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Pass Refactor Friday, October 2, 2009 2
  • 14. TDD Rhythm Test, Code, Refactor Add a Test Pass Run the Test Fail Make a little change Fail Run the Test Pass Refactor Friday, October 2, 2009 2
  • 16. rk? e? Ho a Wo m her wt oS E xtr probl e tar a t? th ere Wh Is o? W hen ? ROI? Pro duc tivit y? Friday, October 2, 2009 3
  • 19. Post Agile New to Agile Friday, October 2, 2009 5
  • 20. Post Agile Expert TDD New to TDD Practitioners New to Agile Friday, October 2, 2009 5
  • 26. We don’t travel like this Friday, October 2, 2009 11
  • 27. We are getting there... Friday, October 2, 2009 12
  • 34. Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Friday, October 2, 2009 18
  • 35. Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Going out for Movie (THX sound and Digital projection) Friday, October 2, 2009 18
  • 36. Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Going out for Movie (THX sound and Digital projection) Going out for meal (one veg.) Friday, October 2, 2009 18
  • 37. Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Going out for Movie (THX sound and Digital projection) Going out for meal (one veg.) Going shopping ($50) [10 Minutes] Friday, October 2, 2009 18
  • 38. Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Going out for Movie (THX sound and Digital projection) Going out for meal (one veg.) Going shopping ($50) [10 Minutes] Present back to the group your findings. [3 minutes per group] Friday, October 2, 2009 18
  • 39. Acceptance Criteria and Tests A critical piece of Agile Friday, October 2, 2009 19
  • 40. Acceptance Criteria Is a set of conditions that the Story must meet for it to be accepted as complete Is typically provided by the customer or product owner. Is not a replacement for conversation. Is one of the results of the conversation Acceptance Criteria are NOT tests Friday, October 2, 2009 20
  • 41. Given [Precondition] When [Actor + Action] Then [Observable Result] Friday, October 2, 2009 21
  • 42. Acceptance Criteria Examples (data + scenarios) Acceptance Tests Friday, October 2, 2009 22
  • 43. Acceptance Criteria + Examples (data + scenarios) Acceptance Tests Friday, October 2, 2009 22
  • 44. Demo Roman Numerals to Decimal Conversion Example Friday, October 2, 2009 23
  • 45. 1 May 1 Jul 1 Sep 1 Nov Analysis Design Implementation ERD DFD DD ST Friday, October 2, 2009 24
  • 46. Business Facing Are we building the right product? Are we building the product right? Technology/Implementation Facing Friday, October 2, 2009 25
  • 47. Brian Marick’s Test Categorization Business Facing Supports Programming Critique product Technology/Implementation Facing Friday, October 2, 2009 26
  • 48. It Helps to think... Business Facing Drives Development Critique product Technology/Implementation Facing Friday, October 2, 2009 27
  • 49. It Helps to think... Business Facing Drives Development Critique product Unit Testing Technology/Implementation Facing Friday, October 2, 2009 27
  • 50. It Helps to think... Business Facing Acceptance Testing Drives Development Low-fi prototypes Critique product Unit Testing Technology/Implementation Facing Friday, October 2, 2009 27
  • 51. It Helps to think... Business Facing Acceptance Testing Exploratory Testing Drives Development Low-fi prototypes UI and Usability Testing Critique product Unit Testing Technology/Implementation Facing Friday, October 2, 2009 27
  • 52. It Helps to think... Business Facing Acceptance Testing Exploratory Testing Drives Development Low-fi prototypes UI and Usability Testing Critique product Performance Testing Unit Testing System Tests Technology/Implementation Facing Friday, October 2, 2009 27
  • 53. Acceptance Test Driven Friday, October 2, 2009 28
  • 54. Acceptance Test Driven Story Friday, October 2, 2009 28
  • 55. Acceptance Test Driven Acceptance Criteria Story Friday, October 2, 2009 28
  • 56. Acceptance Test Driven Iteration Acceptance Criteria Story Friday, October 2, 2009 28
  • 57. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Story Friday, October 2, 2009 28
  • 58. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Automated Story Unit Test Friday, October 2, 2009 28
  • 59. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Automated Story Unit Test Automated Acceptance Tests Friday, October 2, 2009 28
  • 60. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Automated Story Unit Test Automated Acceptance Tests Exploratory Testing Friday, October 2, 2009 28
  • 61. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Automated Story Unit Test Automated Acceptance Tests Acceptance Exploratory Criteria Testing Friday, October 2, 2009 28
  • 62. Acceptance Test Driven Iteration Automated Acceptance Acceptance Tests Criteria Automated Story Unit Test Automated UI Tests Automated Acceptance Tests Acceptance Exploratory Criteria Testing Friday, October 2, 2009 28
  • 63. Acceptance Test Driven Iteration Automated Acceptance P Acceptance Tests E Criteria R F O Automated R Story Unit Test M T Automated E E UI Tests N S C T E S Automated Acceptance Tests Acceptance Exploratory Criteria Testing Friday, October 2, 2009 28
  • 64. Mike Cohn’s Testing Pyramid Friday, October 2, 2009 29
  • 65. Mike Cohn’s Testing Pyramid GUI Tests Friday, October 2, 2009 29
  • 66. Mike Cohn’s Testing Pyramid Small in Number GUI Tools: Selenium, Sahi, Watir, Abbot, Frankenstein Tests Friday, October 2, 2009 29
  • 67. Mike Cohn’s Testing Pyramid Small in Number GUI Tools: Selenium, Sahi, Watir, Abbot, Frankenstein Tests Acceptance Tests Friday, October 2, 2009 29
  • 68. Mike Cohn’s Testing Pyramid Small in Number GUI Tools: Selenium, Sahi, Watir, Abbot, Frankenstein Tests Acceptance At least one per story Tools: Fit, FitNesse, RSpec, Cucumber Tests Friday, October 2, 2009 29
  • 69. Mike Cohn’s Testing Pyramid Small in Number GUI Tools: Selenium, Sahi, Watir, Abbot, Frankenstein Tests Acceptance At least one per story Tools: Fit, FitNesse, RSpec, Cucumber Tests Unit Tests Friday, October 2, 2009 29
  • 70. Mike Cohn’s Testing Pyramid Small in Number GUI Tools: Selenium, Sahi, Watir, Abbot, Frankenstein Tests Acceptance At least one per story Tools: Fit, FitNesse, RSpec, Cucumber Tests At least one per class or module Tools: xUnit, TestNG Unit Tests Friday, October 2, 2009 29
  • 71. Acceptance Tests View UI Model and Presenter Business Tier Data Store Friday, October 2, 2009 30
  • 72. Why care about TDD? Friday, October 2, 2009 31
  • 74. # of Lines of Code? Friday, October 2, 2009 33
  • 75. # of Story Points (estimates)? Friday, October 2, 2009 34
  • 77. # of Features developed? Friday, October 2, 2009 35
  • 78. # of Features tested? Friday, October 2, 2009 35
  • 79. # of Features deployed? Friday, October 2, 2009 35
  • 80. # of Features used actively? Friday, October 2, 2009 35
  • 81. What about Maintenance? Friday, October 2, 2009 36
  • 82. Stay away from (time hungry) debugger Friday, October 2, 2009 37
  • 83. Manual (monkey) Checking by Developers and Tester Friday, October 2, 2009 38
  • 85. Reduce Wastage: Hand Overs Friday, October 2, 2009 40
  • 87. Living, up-to-date specification Friday, October 2, 2009 42
  • 88. Communicate Design Decisions Friday, October 2, 2009 43
  • 89. Learning: Listen to your code Friday, October 2, 2009 44
  • 90. Baby Steps: Slow down and think Friday, October 2, 2009 45
  • 92. Testable Code by Design + Safety Net Friday, October 2, 2009 47
  • 93. Loosely Coupled Design Friday, October 2, 2009 48
  • 95. Test Driven Design Before you take the plunge Friday, October 2, 2009 50
  • 101. Avatars of TDD Rule of Diversity Distrust all claims for “One True Way” Friday, October 2, 2009 56
  • 102. Business Facing Drives Development Critique product Inside Out Outside In Technology/Implementation Facing Brian Marick’s Test Categorization Friday, October 2, 2009 57
  • 103. Veterinarian Information System Friday, October 2, 2009 58
  • 104. Outside In: ATDD Fitnesse Document: Assertions: 17 right, 0 wrong, 0 ignored, 0 exceptions com.vis.billing.fixtures.PaidCashBill procedure details on the bill account details name cost account number patient name owner name Routine Office Visit 250 1001 Fluffy Dave Atkins Rabies Vaccination 50 procedure details pay Cash name cost patient name? owner name? account number? bill no? payment method? amount paid? Routine Office Visit 250 Fluffy Dave Atkins 1001 1 Cash 300 Rabies Vaccination 50 bill check paid true account number? owner name? patient name? total? paid? 1001 Dave Atkins Fluffy 300 false check total 0 Friday, October 2, 2009 59
  • 105. Outside In: Output Friday, October 2, 2009 60
  • 106. ATDD: Another Example Acceptance test: class FluffyTest < Test::Unit::TestCase def test_examination_and_shots vet = Veterinarian.new clinic = Clinic.new "Main Line health" dave = Owner.new "Dave" fluffy = Patient.new "Fluffy" dave.has fluffy visit = clinic.visit(fluffy, vet) do |v| v.procedure "Rabies vaccination", 50 end invoice = visit.invoice assert_equal invoice.to_s, <<-INVOICE Routine visit: $200 Rabies vaccination: $50 Total: $250 INVOICE receipt = clinic.pay_for visit, 100 assert_equal receipt.to_s, <<-RECEIPT Paid $100 for Routine visit Paid $0 for Rabies vaccination Outstanding: $150 RECEIPT end end Friday, October 2, 2009 61
  • 107. Outside In: Output Friday, October 2, 2009 62
  • 108. Inside Out: Unit TDD public class ClinicTest { private Clinic clinic = new Clinic(); @Test public class BillableTest { public void amountOnTheReceiptShouldMatchBillableAmount() throws Exception { Billable billable = new Billable() { private static final Account daveSAccount = new Account(101, "Dave"); public int totalAmount() { return 0; } private static final List<Service> services = new ArrayList<Service>(); }; Account dave = new Account(101, "Dave"); @Test public void totalBillableAmountShouldBeZeroIfNoServicesAreProvided() { Receipt rcpt = clinic.payCash(dave, billable); Billable bill = new Bill(daveSAccount, services); assertEquals("Amount on receipt does match procedure cost", billable.totalAmount(), assertEquals("Total amount is not Zero", 0, bill.totalAmount()); rcpt.getAmount()); } } @Test @Test public void totalBillableAmountShouldBeTotalOfEachServiceProvided() { public void customerPayesBillableAmountForCashTransaction() throws Exception { services.add(new Procedure("Rabies Vaccination", 250)); final int billableAmount = 56; services.add(new Procedure("Regular office Visit", 50)); class AmountCharged { int charged; }; final AmountCharged charged = new AmountCharged(); Billable bill = new Bill(daveSAccount, services); Billable billable = new Billable() { assertEquals("Total Amount is not 300", 300, bill.totalAmount()); public int totalAmount() { } return billableAmount; } @After }; public void cleanUp() { services.clear(); Account dave = new Account(101, "Dave") { } public void charge(int amount) { } charged.charged = amount; } }; clinic.payCash(dave, billable); assertEquals("Account is not charged billable amount", billableAmount,charged.charged); } } Friday, October 2, 2009 63
  • 109. Inside Out: Output Friday, October 2, 2009 64
  • 110. Inside Out: Another Example public class ChargeAccountForServices { private static final Billable bill = createMock(Billable.class); private static final Accountable account = createMock(Accountable.class); private static final Clinic clinic = new Clinic(); @Before public void setUp() { reset(account); @Test reset(bill); public void shouldHaveZeroAmountDueOnReceiptIfCompletePaymentIsMade() { } expect(bill.amount()).andReturn(300); replay(bill); @Test Receipt receipt = clinic.pay(300, bill, account); public void shouldMakePaymentsAgainstAnAccount() { verify(bill); account.paid(bill); assertEquals(300, receipt.amount()); replay(account); assertEquals(0, receipt.amountDue()); clinic.pay(300, bill, account); } verify(account); } @Test public void shouldDisplayAmountDueOnTheReceiptIfIncompletePaymentIsMade() { expect(bill.amount()).andReturn(500); replay(bill); Receipt receipt = clinic.pay(300, bill, account); verify(bill); assertEquals(300, receipt.amount()); assertEquals(200, receipt.amountDue()); } } Friday, October 2, 2009 65
  • 111. public class CreateBillForClientAccount { private static final List<Service> services = new ArrayList<Service>(); private static final Accountable account = createMock(Accountable.class); private Bill bill; @Before public void setUp() { reset(account); } @Test public void shouldThrowExceptionIfAccountIsNotDueForPayment() { @Test expect(account.isPaymentDue()).andReturn(false); public void shouldCreateABillWithTheTotalCostOfAllTheServices() { replay(account); IMocksControl control = createControl(); try { Service rabiesVaccination = control.createMock(Service.class); new Bill(account, null); Service routineVisit = control.createMock(Service.class); } catch (NoPaymentDueException e) { services.add(rabiesVaccination); // expected services.add(routineVisit); } expect(account.isPaymentDue()).andReturn(true); verify(account); expect(account.unpaidServices()).andReturn(services); } bill(); @After expect(rabiesVaccination.cost()).andReturn(250); public void cleanUp() { expect(routineVisit.cost()).andReturn(50); services.clear(); } control.replay(); assertEquals(300, bill.amount()); control.verify(); } private void bill() throws NoPaymentDueException { replay(account); bill = new Bill(account, null); verify(account); } } Friday, October 2, 2009 66
  • 112. Inside Out: Output Friday, October 2, 2009 67
  • 113. Coffee Vending Machine How would you develop it? Friday, October 2, 2009 68
  • 115. Friday, October 2, 2009 70
  • 116. Friday, October 2, 2009 71
  • 117. Friday, October 2, 2009 72
  • 118. Visualizing Proficiency Industrial Logic’s e-learning Automated Analysis of Lab Exercises http://industriallogic.com/elearning/ Friday, October 2, 2009 73
  • 119. Friday, October 2, 2009 74
  • 120. Friday, October 2, 2009 75
  • 121. Friday, October 2, 2009 76
  • 122. Friday, October 2, 2009 77
  • 123. Friday, October 2, 2009 78
  • 124. Friday, October 2, 2009 79
  • 125. Tools & Practices Friday, October 2, 2009 80
  • 128. Friday, October 2, 2009 83
  • 129. Coding Convention + Static Code Analysis Friday, October 2, 2009 84
  • 134. Migrate4j Bering Friday, October 2, 2009 89
  • 135. Questions? naresh@agilefaqs.com Friday, October 2, 2009 90