Growing software from examples Seb Rose, Claysnow Limited Blog:

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

09/04/2015Unit 2 (b) Back-Office processes Unit 2 Assessment Criteria (b) 10 marks.
Web Pricing User Manual
Story-Based Test Automation Using Free Tools
Now we will introduce you to the computer program that you will use throughout the semester. This program will allow you to create a customized Study Plan,
Snejina Lazarova Senior QA Engineer, Team Lead CRMTeam Dimo Mitev Senior QA Engineer, Team Lead SystemIntegrationTeam Telerik QA Academy Telerik QA Academy.
Realtime Equipment Database F.R.E.D. stands for Fastline’s Realtime Equipment Database. F.R.E.D. will allow you to list all your inventory online. F.R.E.D.
Amazon.com Collaborative Project Group Members: Brian Alt Eranda Samarasinghe Jasbir Singh Due: December 3 rd, 2003 Eng 393.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
UML exam advice. Minimal, yet sufficient UML course 80% of modeling can be done with 20% of the UML. Which 20% was that again? We’re supposed to be “Use.
Portman Online Rail User Guide The booking tool is compatible with internet Explorer 8 or higher
How to get your free Windows Store Access
Living Requirements using Behavior Driven Development
The first step in getting what you want is to decide what you want.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials The internet: Safe online shopping Suitable for: Improver.
Tutorial Video basic skills basic skills Next page -->
SIMPLY AMAZING SPORTS CLUB REGISTRATION & MANAGEMENT
The Sixth Form College Farnborough Online Payments Mark Embling Senior Software Developer The Sixth Form College Farnborough.
Getting started on informaworld™ How do I register with informaworld™? What do I do if I forget my password? My institution does not subscribe to any journals,
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
WNS1.com Online Training How to use the Western Nevada Supply online store and tools.
Getting started on informaworld™ How do I register my institution with informaworld™? How is my institution’s online access activated? What do I do if.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Student Technical Support
MyBCommLab First Day of Class Registration Walkthrough.
MyBCommLab First Day of Class Registration Walkthrough.
1 DoD Cardholder Self Registration November 21, 2008.
How will this presentation benefit ME? Save Money Get a higher tax return Get a Higher Grade.
Plan Design Analyze Develop Test Implement Maintain Systems Development Life Cycle MAT Dirtbikes.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
MyManagementLab. Purchasing Options: Bookstore: Text + MyLab access code package Access code with eText stand-alone Online: (
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Contact Us: For more information on this or any other TownNews.com product, contact your regional sales manager. Main TownNews.com Office:
MyMISLab First Day of Class Registration Walkthrough.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
BEHAVIOR DRIVEN TEST DEVELOPMENT Specification by Example.
 Shopping Basket  Stages to maintain shopping basket in framework  Viewing Shopping Basket.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
 How we should structure our checkout and order process?  Checkout and Order Process of our framework  Stages of Checkout and Order Process.
BEHAVIOR DRIVEN TEST DEVELOPMENT Specification by Example All Rights Reserved - Sound Agile Consulting.
Thetimes.co.uk Top level review of subscription & pay wall.
MyMarketingLab First Day of Class Registration Walkthrough.
Executive Summary - Human Factors Heuristic Evaluation 04/18/2014.
Registering for MasteringBiology TM
Navigation: If the tutorial opens up in your web browser, simply click your mouse to advance to the next slide. Use the “Backspace”
On-Line BankCard Center Presentation Cardholder Role During the Presentation click the mouse on this button to move back a slide During the Presentation.
3M Partners and Suppliers Click to edit Master title style USER GUIDE Supplier eInvoicing USER GUIDE The 3M beX environment: Day-to-day use.
Learning Aim A.  Websites are constructed on many different features.  It can be useful to think about these when designing your own websites.
E commerce Online Shopping Website at Rs. 7920/-.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Returns Guide Returning your goods is a simple 2 step process: Step 1# Your returns Paperwork - This ensures your refunded for any item being returned.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
Introduction to Workbot 2.0 Ryan Li  Test automation  ant the Cucumber.
User Stories > Big and Small
How to become a 'specification by example' rocket scientist
The Login Page is the first page your customers
CMPE 280 Web UI Design and Development August 29 Class Meeting
Behavior Driven Test Development
How To Create Cox New Account?
Getting started on informaworld™
Promoting Self-Service
UMass staff and faculty purchases for personal use
UCFB Online Store User Guide.
Use cases Dr. X.
Presentation transcript:

Growing software from examples Seb Rose, Claysnow Limited Blog:

Heavily influenced by GOOS book:

They’re called different things The difference is that one is called Behaviour Driven Development – and some people find that wording useful – and one (or two) is called (Acceptance) Test Driven Development – and some people find that wording useful in a different way. And that’s it. Liz Keogh,

Test Driven Development Acceptance Test Driven Development Behaviour Driven Development Domain Driven Design Specification by Example Example Driven Development Customer Test

PatternGenerally good forGenerally bad for Given/When/Th en Tests that require a lot of setup OR easily forgotten setup Tests that have a non-obvious trigger Tests with few expected outputs Tests that have unimportant/simple/obvious preconditions Tests where there are multiple different inputs and multiple different outputs Tests where a single Given/When/Then only describes one of numerous very similar test scenarios Specification By Example - Conceptual or Concrete Tests that have numerous: Inputs that affect output behavior Outputs/expected behaviors Tests where it’s important to test a lot of different data scenarios Tests where the trigger event is somewhat obvious Any test where it seems like a table would be useful to: describe the test better, or help explore all of the possible inputs and outputs for a test. Simple tests Tests that are more about verifying simple UI behavior For instance – “Test that an error message is displayed when the user enters an incorrect password.” Test where there is really only one input or precondition mmary3.pdf

Outside-in

Understandable Maintainable Necessary Granular Reliable

Understandable

Maintainable

Necessary

Granular

Reliable

Declarative - makes a statement (.) Prefer declarative examples Exclamatory - shows excitement (!) Interrogative - asks a question (?) Imperative - makes a command (.)

Imperative vs Declarative Style Feature: Sign up Scenario: New user redirected to their own page Given I am not logged in And I visit the homepage And I follow "Sign up" And I fill in "Username" with "Seb" And I fill in "Password" with "password" And I fill in "Confirm password" with "password" When I press "Sign up" Then I should be on my feeds page And I should see "Hello, Seb"

Imperative vs Declarative Style Feature: Sign up Scenario: New user redirected to their own page When I sign up for a new account Then I should be taken to my feeds page And I should see a greeting message

Imperative vs Declarative Style Feature: The entire system This feature illustrates what can happen when you take the declarative style too far. Scenario: It works When I use the system Then it should work perfectly

Remember your audience Who should be able to read the examples? Keep things clear. What is their interest in them?

Don’t hide the context [Test]public void asterisk_should_format_to_em(){ String expected = "This is em text"; String actual = f.Format("This is *em* text"); Assert.AreEqual(expected, actual);}

Don’t hide the context Scenario: Increased delivery charges for zip code Given my delivery zip code is in Alaska When I go to the checkout Then I will have to pay the higher delivery charges

Don’t hide the void smoker_requires_manual_referral(){ Referral referral = underwriting.process(smoker); Assert.assertEquals(Referral.Manual, referral);}

Make data void smoker_requires_manual_referral(){ Customer customer = new Customer(“Joe”, “Smith”, “12/12/1980”, “Accountant”, “$300,000”, “Yes”, “No”); Referral referral = underwriting.process(customer); Assert.assertEquals(Referral.Manual, referral);}

Emphasise interesting void smoker_requires_manual_referral(){ CustomerBuilder builder = new CustomerBuilder(); Customer customer = builder.withSmokerFlag().build(); Referral referral = underwriting.process(customer); Assert.assertEquals(Referral.Manual, referral);}

Work collaboratively Create a ubiquitous language. Use examples to discover the domain. Decompose ruthlessly.

Online subscriptions In order to increase subscriptions visitors should be able to subscribe online with a VISA card User / Stakeholder Story

VISA subscriptions In order to increase subscriptions visitors should be able to subscribe online with a VISA card User / Stakeholder Story

VISA subscriptions In order to increase subscriptions visitors should be able to subscribe online with a VISA card Acceptance Criteria Must support VISA Does not need to support MasterCard, Switch... Customers should be prevented from entering invalid credit card details... Credit Card Processing Acceptance criteria:

Really? So tell me... "Customers should be prevented from entering invalid credit card details" What exactly makes someone's credit card details invalid? Can they use spaces? Should we checksum the digits? How do we feed back that the details are invalid?

Avoid workflow style Every journey is made from single steps. Workflows are more brittle. A few workflows go a long way.

aopwork11/TestingPyramid.jpg Exploratory and manual

Workflow style Scenario: Happy path for registration and purchase Given I am on the homepage And I register for an account in Alaska And I go to the most popular item page And I add the most popular item to my basket And I go to checkout And I select my delivery address And I give valid payment details When I confirm acceptance of terms and conditions Then my purchase will be confirmed

Workflow style Scenario: Correct postage price for Alaska Given I am on the homepage And I register for an account in “Alaska” And I go to the most popular item page And I add the most popular item to my basket And I go to checkout When I select delivery to my home address Then I have to pay the higher delivery charge

Focus on a single step Scenario: Correct postage price for Alaska Given I am on the checkout page When I select delivery to “Alaska” Then I have to pay the higher delivery charge

Consider costs and benefits Remove unnecessary examples Exercise the thinnest slice possible Automate when viable

Cost Risk Manual Automate

Don’t let example dictate mechanism Visibility depends on interest not layer. Insulate examples from technical details. Acceptance tests not always end-to-end.

Make technical tests visible Scenario: High Risk rates for Test Pilots Given an applicant with occupation “Test Pilot” When the underwriting engine is invoked Then we will use the “High Risk” rates table

Scenario: Applicant with high risk occupation Given a standard, single-life, male applicant But with a high risk occupation When the application is processed Then it will be referred for manual underwriting Is this end

Categorise in multiple dimensions Faster feedback is better. Other dimensions are also useful. Take advantage of partitioning.

Summary Example-based methods are very similar. Minor variations by target audience. Skills are transferable.

Nomenclature Check Example Specification Test

Seb Rose Blog:

Backup

Drive out traceability - - -

Verify dependencies - - -