2012 regina TC - 103 quality driven

  • 331 views
Uploaded on

Presentation done at Regina Technical Community

Presentation done at Regina Technical Community

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
331
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. AMIR BARYLKO QUALITY DRIVEN USING BDD + TDDAmir Barylko - Quality Driven MavenThought Inc.
  • 2. TESTING Why Testing? Unit tests TDD Integration Tests Acceptance TestsAmir Barylko - Quality Driven MavenThought Inc.
  • 3. REALITY CHECK • It is impossible to gather all the requirements at the beginning of a project. • Whatever requirements you do gather are guaranteed to change. • There will always be more to do than time and money will allow.Amir Barylko - Quality Driven MavenThought Inc.
  • 4. NO MORE EXCUSES • It works on my computer! • It was like that when I got here! • The previous developer didn’t know XXXX! • We need a satellite connection in order to run it! • We can’t reproduce the error! • We can’t test that!Amir Barylko - Quality Driven MavenThought Inc.
  • 5. UNIT TESTING • Test for a class or method • No dependencies • Should use mocking • Small • ClearAmir Barylko - Quality Driven MavenThought Inc.
  • 6. 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 - Quality Driven MavenThought Inc.
  • 7. 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 - Quality Driven MavenThought Inc.
  • 8. WHEN TDD IS NOT ENOUGH •Legacy Code •Refactoring is not viable •Verify functionality across layers •Validate feature end to endAmir Barylko - Quality Driven MavenThought Inc.
  • 9. INTEGRATION TEST •More than one class •Still some parts can be mocked •Partial functionality of subsystemAmir Barylko - Quality Driven MavenThought Inc.
  • 10. ACCEPTANCE TEST •Black box testing •Crossing all layers •Should cover all scenarios •External subsystems may be mockedAmir Barylko - Quality Driven MavenThought Inc.
  • 11. SOFTWARE QUALITY What is it? Low Quality Classic QAAmir Barylko - Quality Driven MavenThought Inc.
  • 12. WHAT DOES IT MEAN? • Better code? • Faster delivery? • Less bugs? • Make sure we deliver the right thing? • Better Processes?Amir Barylko - Quality Driven MavenThought Inc.
  • 13. LOW QUALITY • Lack of testing • Lack of communication • Lack of metrics • Lack of traceability • Wrong toolsAmir Barylko - Quality Driven MavenThought Inc.
  • 14. 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 - Quality Driven MavenThought Inc.
  • 15. DOES IT WORK? •Your opinion here......Amir Barylko - Quality Driven MavenThought Inc.
  • 16. A NEW CONCEPT Feature First Benefits Outside In Approach Runnable features RolesAmir Barylko - Quality Driven MavenThought Inc.
  • 17. 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 - Quality Driven MavenThought Inc.
  • 18. BENEFITS • Focus on the feature • Testing all the way • Traceability • Quality every step of the processAmir Barylko - Quality Driven MavenThought Inc.
  • 19. OUTSIDE IN APPROACH Red BDD Red Refactor Refactor TDD Green GreenAmir Barylko - Quality Driven MavenThought Inc.
  • 20. RUNNABLE FEATURES • Features describe functionality • What if we could run them? • Then features would validate functionality • Becoming live documentationAmir Barylko - Quality Driven MavenThought Inc.
  • 21. ROLES • Who writes the feature? • Who implements the feature? • Who validates the feature? • What’s the role of QA, PM, etc?Amir Barylko - Quality Driven MavenThought Inc.
  • 22. WRITING FEATURES Gherkin Syntax Feature Scenario StepsAmir Barylko - Quality Driven MavenThought Inc.
  • 23. GHERKIN DSL • Business readable DSL • Flush out requirements • Documentation • Automated testing • Used by Cucumber, SpecFlow, jBehaveAmir Barylko - Quality Driven MavenThought Inc.
  • 24. 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 - Quality Driven MavenThought Inc.
  • 25. 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 - Quality Driven MavenThought Inc.
  • 26. SCENARIOS • Each feature file can have multiple scenarios • Each scenario can contain multiple steps • Keywords: • Given When Then • And Not ButAmir Barylko - Quality Driven MavenThought Inc.
  • 27. 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 - Quality Driven MavenThought Inc.
  • 28. DEMOAmir Barylko - Quality Driven MavenThought Inc.
  • 29. QUESTIONS?Amir Barylko - Quality Driven MavenThought Inc.