AMIR BARYLKO                             QUALITY DRIVEN                            BEHAVIOUR DRIVEN                       ...
WHO AM I?    • Architect    • Developer    • Mentor    • Great             cook    • The          one who’s entertaining y...
TESTING                                          Unit tests                                            TDD                ...
UNIT TESTING    • Test             for a class or method    • No             dependencies    • Should                use m...
TDD    • First            write a test that fails (RED)    • Write                  code to make it pass (GREEN)    • Chec...
BENEFITS OF TDD    • Prove                 that your code     • Regression   tests as        works                        ...
WHEN TDD IS NOT ENOUGH    •Legacy Code    •Refactoring is not viable    •Verify functionality across layers    •Validate f...
INTEGRATION TEST    •More                    than one class    •Still                  some parts can be mocked    •Partia...
ACCEPTANCE TEST    •Black                  box testing    •Crossing                  all layers    •Should                ...
SOFTWARE QUALITY                                  What is it?                                 Low Quality                 ...
WHAT DOES IT MEAN?    • Better                code?    • Faster                delivery?    • Less             bugs?    • ...
LOW QUALITY    • Lack           of testing    • Lack           of communication    • Lack           of metrics    • Lack  ...
CLASSIC QA    • Team              separated from developments    • Follow                scripts or requirements    • Done...
DOES IT WORK?    •Your                   opinion here......Amir Barylko - BDD                               MavenThought I...
A NEW CONCEPT                                 Feature First                                    Benefits                    ...
FEATURE FIRST    • Write                 the feature before implementation    • Developers                 will implement ...
BENEFITS    • Focus                 on the feature    • Testing                all the way    • Traceability    • Quality ...
OUTSIDE IN APPROACH                                       Red                                       BDD                   ...
RUNNABLE FEATURES    • Features                 describe functionality    • What                  if we could run them?   ...
ROLES    • Who                   writes the feature?    • Who                   implements the feature?    • Who          ...
WRITING FEATURES                                  Gherkin                                   Syntax                        ...
GHERKIN DSL    • Business              readable DSL    • Flush           out requirements    • Documentation    • Automate...
SYNTAX    Feature: Listing movies         As a User         I want to list movies         So I can see the contents of the...
FEATURES    • Keyword               Feature    • The          rest is free text    Feature: Listing movies      As a User ...
SCENARIOS    • Each                  feature file can have multiple scenarios    • Each                  scenario can conta...
STEPS    Scenario: Browse available movies           Given I have some movies           When             I go to the listi...
TOOLS                                 jBehave                                 Scalatest                            Cucumbe...
JBEHAVEAmir Barylko - BDD                    MavenThought Inc.Tuesday, January 10, 2012
SCALATESTAmir Barylko - BDD                      MavenThought Inc.Tuesday, January 10, 2012
CUCUMBERAmir Barylko - BDD                     MavenThought Inc.Tuesday, January 10, 2012
BDD DEMOAmir Barylko - BDD                     MavenThought Inc.Tuesday, January 10, 2012
QUESTIONS?Amir Barylko - BDD                       MavenThought Inc.Tuesday, January 10, 2012
RESOURCES    • Contact               me: amir@barylko.com, @abarylko    • Download: http://www.orthocoders.com/presentatio...
RESOURCES II    • jBehave: http://jbehave.org    • Cucumber: http://cukes.info    • ScalaTest: http://scalatest.org    • S...
Upcoming SlideShare
Loading in...5
×

Jvm-bdd-quality-driven

494

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
494
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Jvm-bdd-quality-driven"

  1. 1. AMIR BARYLKO QUALITY DRIVEN BEHAVIOUR DRIVEN DEVELOPMENT JVM UG JAN 2012Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  2. 2. WHO AM I? • Architect • Developer • Mentor • Great cook • The one who’s entertaining you for the next hour!Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  3. 3. TESTING Unit tests TDD Integration Tests Acceptance TestsAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  4. 4. UNIT TESTING • Test for a class or method • No dependencies • Should use mocking • Small • ClearAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  5. 5. TDD • First write a test that fails (RED) • Write code to make it pass (GREEN) • Check if code can be improved (REFACTOR) • Start again until it’s doneAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  6. 6. BENEFITS OF TDD • Prove that your code • Regression tests as works byproduct • Avoid waste • Makechanges with (debugging) confidence • Increment code quality • Bring back the joy of coding! • Better designAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  7. 7. WHEN TDD IS NOT ENOUGH •Legacy Code •Refactoring is not viable •Verify functionality across layers •Validate feature end to endAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  8. 8. INTEGRATION TEST •More than one class •Still some parts can be mocked •Partial functionality of subsystemAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  9. 9. ACCEPTANCE TEST •Black box testing •Crossing all layers •Should cover all scenarios •External subsystems may be mockedAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  10. 10. SOFTWARE QUALITY What is it? Low Quality Classic QAAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  11. 11. WHAT DOES IT MEAN? • Better code? • Faster delivery? • Less bugs? • Make sure we deliver the right thing? • Better Processes?Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  12. 12. LOW QUALITY • Lack of testing • Lack of communication • Lack of metrics • Lack of traceability • Wrong toolsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  13. 13. CLASSIC QA • Team separated from developments • Follow scripts or requirements • Done after the feature is implemented • May have more than one project in the queue • Feedback cycle may take weeks • Manual (no automation)Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  14. 14. DOES IT WORK? •Your opinion here......Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  15. 15. A NEW CONCEPT Feature First Benefits Outside In Approach Runnable features RolesAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  16. 16. FEATURE FIRST • Write the feature before implementation • Developers will implement feature using TDD • QA will validate against feature • Repeat until all features are doneAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  17. 17. BENEFITS • Focus on the feature • Testing all the way • Traceability • Quality every step of the processAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  18. 18. OUTSIDE IN APPROACH Red BDD Red Refactor Refactor TDD Green GreenAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  19. 19. RUNNABLE FEATURES • Features describe functionality • What if we could run them? • Then features would validate functionality • Becoming live documentationAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  20. 20. ROLES • Who writes the feature? • Who implements the feature? • Who validates the feature? • What’s the role of QA, PM, etc?Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  21. 21. WRITING FEATURES Gherkin Syntax Feature Scenario StepsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  22. 22. GHERKIN DSL • Business readable DSL • Flush out requirements • Documentation • Automated testing • Used by Cucumber, SpecFlow, jBehaveAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  23. 23. SYNTAX Feature: Listing movies As a User I want to list movies So I can see the contents of the library Scenario: Browse available movies Given I have the following movies When I go to "Movies" Then I should see in the listingAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  24. 24. FEATURES • Keyword Feature • The rest is free text Feature: Listing movies As a User I want to list movies So I can see the contents of the libraryAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  25. 25. SCENARIOS • Each feature file can have multiple scenarios • Each scenario can contain multiple steps • Keywords: • Given When Then • And Not ButAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  26. 26. STEPS Scenario: Browse available movies Given I have some movies When I go to the listing page Then I should see all the moviesAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  27. 27. TOOLS jBehave Scalatest Cucumber + Capybara jDaveAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  28. 28. JBEHAVEAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  29. 29. SCALATESTAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  30. 30. CUCUMBERAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  31. 31. BDD DEMOAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  32. 32. QUESTIONS?Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  33. 33. RESOURCES • Contact me: amir@barylko.com, @abarylko • Download: http://www.orthocoders.com/presentationsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  34. 34. RESOURCES II • jBehave: http://jbehave.org • Cucumber: http://cukes.info • ScalaTest: http://scalatest.org • Selenium: http://seleniumhq.org • jDave: http://jdave.org • EasyB: http://easyb.orgAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×