Jvm-bdd-quality-driven
Upcoming SlideShare
Loading in...5
×
 

Jvm-bdd-quality-driven

on

  • 671 views

 

Statistics

Views

Total Views
671
Views on SlideShare
671
Embed Views
0

Actions

Likes
1
Downloads
19
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Jvm-bdd-quality-driven Jvm-bdd-quality-driven Presentation Transcript

  • AMIR BARYLKO QUALITY DRIVEN BEHAVIOUR DRIVEN DEVELOPMENT JVM UG JAN 2012Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • TESTING Unit tests TDD Integration Tests Acceptance TestsAmir Barylko - BDD Training OCT ‘11 MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • SOFTWARE QUALITY What is it? Low Quality Classic QAAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • LOW QUALITY • Lack of testing • Lack of communication • Lack of metrics • Lack of traceability • Wrong toolsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • DOES IT WORK? •Your opinion here......Amir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • A NEW CONCEPT Feature First Benefits Outside In Approach Runnable features RolesAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • BENEFITS • Focus on the feature • Testing all the way • Traceability • Quality every step of the processAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • OUTSIDE IN APPROACH Red BDD Red Refactor Refactor TDD Green GreenAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • 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
  • WRITING FEATURES Gherkin Syntax Feature Scenario StepsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • GHERKIN DSL • Business readable DSL • Flush out requirements • Documentation • Automated testing • Used by Cucumber, SpecFlow, jBehaveAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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
  • 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
  • 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
  • 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
  • TOOLS jBehave Scalatest Cucumber + Capybara jDaveAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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/presentationsAmir Barylko - BDD MavenThought Inc.Tuesday, January 10, 2012
  • 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