How to Use Agile Practices in a Proper Way

 

RUP

 

Waterfall

 

Individuals and interactions over processes and tools


Working software over comprehensive documentation


Customer collaboration over contract negotiation


Responding to change over following a plan

 

 

TDD

 

TDD steps

  • Navigation map

  • Test first

  • Assert first

  • Fail first

  • Continious integration

Test first

describe('Calculator', 
    function () {
        it('should summarize two numbers', 
            function () {
        
            }
        );
    }
);

Assert first

describe('Calculator', function () {

    it('should summarize two numbers', 
        function () {
            sut.sum(1, 2).should.equal(3);
        }
    );

});

Fail first

> mocha test/*.spec.js


  ․

  0 passing (4ms)
  1 failing

  1) String Calculator "before each" hook:
     ReferenceError: Calculator is not defined
      at Context.<anonymous> (/home/apk/workspace/lab/tdd/test/Calculator.spec.js:5:15)
      at callFn (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runnable.js:223:21)
      at Hook.Runnable.run (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runnable.js:216:7)
      at next (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runner.js:258:10)
      at Object._onImmediate (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

Benefits

  • Unit tests coverage

  • Increases assurance of correctness

  • More complete explorations of requirements

  • Improved code

  • Code as documentation

  • Safe refactoring

  • No extra code

Test’em!

grunt-mutation-testing

coverage-blamer

BDD

 

GIVEN...

WHEN...

THEN...

 

ATDD

 

Continious integration

Continious Delivery

1

Pair programming

Time management

Thank you

 

Questions?

 

How to Use Agile Practices in a Proper Way

By Andrey Kucherenko

How to Use Agile Practices in a Proper Way

  • 769
Loading comments...

More from Andrey Kucherenko