Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
TDD-based Workflow
Optimizing Development Process
Akbar Hidayat
Test Driven Development
1. Define Expected Behaviours
2. Code them
assertEquals(
10,
add(4, 6)
);
function add(left, right)
return left + right;
);
BUG
DESTROYER?
BUG
DESTROYER?
TEST NEEDS
DESIGN
Feedback
BUSINESS IMPACTS
CORRECT IMPLEMENTATION
MAINTAINABLE CODE
Tests provide feedback
for the quality of the
design
TDD
TDD can't even be begun until we know the
shape of the system that is to be created.
(Uncle Bob)
BDD
The point of BDD is to get people
communicating and bridge the gap between
‘technical’ and ‘business’ people
(Dan Nort...
Clean Architecture
&
DDD
Breaking it down
1. User Stories
2. Scenario Explorations
3. Architecture Decisions
4. Writing down the test
User Story
As a [role] I want to
[user need] so that
[change]
User Story
1. Who
2. Behavioral Change
3. Business Value
4. Ubiquitous Language
User Story
As an event owner I want to
refund the remaining points
from an event so that I can
use the points again
leanpub.com/50quickideas
Architectural Decisions
TDD can't even be begun until
we know the shape of the
system that is to be created.
(Uncle Bob)
Think how the code
flow
/**
* @expectedException InvariantException
* @expectedExceptionMessage EVENT.REFUND.STILL_ACTIVE
*/
function
given_that_a...
/**
* @test
*/
function
given_that_the_event_is_sponsored_and_when_it_has_been_ref
unded_then_the_remaining_point_should_b...
/**
* @test
*/
function
refunding_a_sponsored_event_should_increase_admin_point()
{
// Simulating HTTP POST to a certain r...
Documentation of
what the SUT does
Documentation of
how it does it
DECODE
IDEAS
DISCOVER
POTENTIAL
TDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development Process
Prochain SlideShare
Chargement dans…5
×

TDD-based workflow: Optimizing Development Process

When we do TDD, it's not just about wrinting down the test.

  • Identifiez-vous pour voir les commentaires

TDD-based workflow: Optimizing Development Process

  1. 1. TDD-based Workflow Optimizing Development Process Akbar Hidayat
  2. 2. Test Driven Development 1. Define Expected Behaviours 2. Code them
  3. 3. assertEquals( 10, add(4, 6) );
  4. 4. function add(left, right) return left + right; );
  5. 5. BUG DESTROYER? BUG DESTROYER?
  6. 6. TEST NEEDS DESIGN
  7. 7. Feedback
  8. 8. BUSINESS IMPACTS
  9. 9. CORRECT IMPLEMENTATION
  10. 10. MAINTAINABLE CODE
  11. 11. Tests provide feedback for the quality of the design
  12. 12. TDD TDD can't even be begun until we know the shape of the system that is to be created. (Uncle Bob)
  13. 13. BDD The point of BDD is to get people communicating and bridge the gap between ‘technical’ and ‘business’ people (Dan North)
  14. 14. Clean Architecture & DDD
  15. 15. Breaking it down 1. User Stories 2. Scenario Explorations 3. Architecture Decisions 4. Writing down the test
  16. 16. User Story As a [role] I want to [user need] so that [change]
  17. 17. User Story 1. Who 2. Behavioral Change 3. Business Value 4. Ubiquitous Language
  18. 18. User Story As an event owner I want to refund the remaining points from an event so that I can use the points again
  19. 19. leanpub.com/50quickideas
  20. 20. Architectural Decisions TDD can't even be begun until we know the shape of the system that is to be created. (Uncle Bob)
  21. 21. Think how the code flow
  22. 22. /** * @expectedException InvariantException * @expectedExceptionMessage EVENT.REFUND.STILL_ACTIVE */ function given_that_an_event_has_not_finished_and_when_the_event_is _being_refunded_then_it_should_fail() { $eventRefund->refund($event, $requester); }
  23. 23. /** * @test */ function given_that_the_event_is_sponsored_and_when_it_has_been_ref unded_then_the_remaining_point_should_be_returned_to_the_a dmin() { ... }
  24. 24. /** * @test */ function refunding_a_sponsored_event_should_increase_admin_point() { // Simulating HTTP POST to a certain route $this->post(‘/refundedevents’, [ ‘id’ => 212 ]); // Check in Database that the admin point has increased ... }
  25. 25. Documentation of what the SUT does
  26. 26. Documentation of how it does it
  27. 27. DECODE IDEAS DISCOVER POTENTIAL

×