adressing requirements with agile practices

30
Addressing Non- Functional Requirements with Agile Practices Francois Boisvert Macadamian Technologies Version: Oct 25 th

Upload: fboisvert

Post on 27-May-2015

232 views

Category:

Technology


0 download

DESCRIPTION

Describes how to handle non-functional requirements in your Agile project.This presentation was done at Microsoft Techdays 2011.

TRANSCRIPT

Page 1: Adressing requirements with agile practices

Addressing Non-Functional Requirements with Agile PracticesFrancois BoisvertMacadamian Technologies

Version: Oct 25th

Page 2: Adressing requirements with agile practices

Who Am I?• VP Services Delivery

• Delivering quality software, on time and on budget

• Customer satisfaction• Macadamian Technologies

• Creating software products, • from napkin sketch to market ready• www.macadamian.com

Page 3: Adressing requirements with agile practices

Agenda

1. Definition• Quality expectations

2. Breaking down the scope• Functional requirements • Non Functional requirements

3. Confirming the scope• Internal quality• External quality

Page 4: Adressing requirements with agile practices

DefinitionWhat are they?

• Specify "how well" the "what" must behave• Impose constraints • Cut across all functional requirements• Criteria that can be used to judge the

operation of a system, rather than specific behaviors

• Also known as "technical requirements", “quality attributes” or "quality of service requirements“

Page 5: Adressing requirements with agile practices

DefinitionIt is all about quality

1. Internal qualities 1. barely visible by stakeholders2. simplify how to build the software3. Evolution

2. External qualities 1. Observable at run time2. visible by stakeholders3. highly desirable4. Execution

Page 6: Adressing requirements with agile practices

DefinitionInternal Quality - What is it?

Non-Functional Requirement

Definition

Simplicity Ease to understand or explain

Maintainability Ease to change and evolve with minimal effort

Testability Ease to confirm conformance by observing a reproducible behavior

Portability Ease to reuse for multiple platforms

Extensibility Ease to takes into consideration future growth

Page 7: Adressing requirements with agile practices

DefinitionExternal Quality - What is it?

Non-Functional Requirement

Definition

Correctness Ability with which the software respects the specification.

Performance Ease with which the software is doing the work it is supposed to do. Usually it is measured as a response time or a throughput.

Reliability Ability with which the software performs its required functions under stated conditions for a specified period of time.

Robustness Ability with which the software copes with errors during execution.

Scalability Ability with which the software handles growing amounts of work in a graceful manner.

Security Degree to which the software protects against threats.

Usability Ease with which the software can be used by specified users to achieve specified goals.

Page 8: Adressing requirements with agile practices

Breaking down the scopeFrom Fuzzy to Accurate

NFR

FR

FRFR

FRFR

FR

Page 9: Adressing requirements with agile practices

Breaking Functional RequirementsTranslate requirements to goals

• Focus on creating value• Users desirable outcome first• Behavior Driven-Development• Enable conversations

Page 10: Adressing requirements with agile practices

Breaking Functional RequirementsExpress goals with user stories

• User story• short description written in everyday language• represents a discrete piece of demonstrable

functionality• It is a desirable outcome by a stakeholder

• Classic template• “As a < role>, I want <goal> so that <benefit>”

Page 11: Adressing requirements with agile practices

Breaking Functional RequirementsExample: User stories for a Transit Authority

• As a <student>, I want <to buy a pass valid only on school days> so that I can <go to school>

• As a <worker>, I want <to buy a monthly pass> so that I can <go to work>

Page 12: Adressing requirements with agile practices

Breaking Functional RequirementsConfirm stories with success criteria

• Establishes the conditions of acceptance• Describes how the stakeholders plan to

verify the desirable outcome• Enables the team to know when they are

done

Page 13: Adressing requirements with agile practices

Breaking Functional RequirementsExpress success criteria with scenarios

• Scenarios• Concrete example written in everyday language• a significant exercise that is required for the

fulfillment of a user story• It is a desirable outcome by a stakeholder• Expressed with formality

• Classic template• “Given < precondition>, When <action> Then

<outcome>”

Page 14: Adressing requirements with agile practices

Breaking Functional RequirementsExample: As a user, I can buy a bus pass

Given the shopping cart contains a monthly passWhen buyer checkout the shopping cartThen the price is 146 dollars

Page 15: Adressing requirements with agile practices

Breaking Functional RequirementsIllustrate collaboratively in a two-step process

Step 2During the iteration

Step 1During the backlog maintenance

Key scenario 2User Story

Key scenario 1

Key scenario 3

Variant of scenario 1

Variant of scenario 1

Variant of scenario 1

Variant of scenario 2

Variant of scenario 2

Variant of scenario 2

Variant of scenario 3

Variant of scenario 3

Variant of scenario 3

Page 16: Adressing requirements with agile practices

Breaking Non-Functional RequirementsTreat NFR as constraints to guide your work

• Imposes a condition to make the requirements in line with quality expectations

• Sets a limit to comply with• Satisfied in a finite period of time• Helps determine whether you have

satisfied the non-functional requirements• Applied to functional scope

Page 17: Adressing requirements with agile practices

Breaking Non-Functional RequirementsTwo types of constraint

• Internal quality • Rule is a “constraint” that sets a limit to

comply during software construction• External quality

• Restriction is a “constraint” that sets a limit to comply during software execution

Page 18: Adressing requirements with agile practices

Breaking Non-Functional RequirementsInternal Quality using “Rules”

• Rule is a constraint that sets how software construction is built

• Rules are global and apply to each scenario• Rules are guidelines• Set the standards• Guide the team in their execution

Page 19: Adressing requirements with agile practices

Breaking Non-Functional RequirementsExamples - Rules

Non-Functional Requirement

Rule

Simplicity Naming convention: Apply a naming conventions on all code

Maintainability Continuous Integration: Verify each new checked in code if it integrates with success in the development branch.

Testability Unit testing: Verify unit tests and Apply the Red-Green-Refactor concept. Write test first, do some code to make the test pass, Refactor the code.

Portability Multi-target compiling: Verify code compile on multiple platforms

Extensibility Design Patterns: Verify key architecture patterns are properly used

Page 20: Adressing requirements with agile practices

Breaking Non-Functional Requirements Restrictions should be SMART

• Specific• It should target a piece of functionality that is small, consistent and

simple• Measurable

• It imposes a limit that is measurable, otherwise how would you know when you’ve addressed it

• Attainable• It is recognized as achievable by the team

• Relevant• It is directly related, connected, and pertinent to the non-functional

requirement • Traceable

• It is linked with a requirement and a target that justifies why it exists

Page 21: Adressing requirements with agile practices

Breaking Non-Functional RequirementsExample - Restrictions

ScenarioGiven buyer is logged has a studentWhen buyer request the list of transit faresThen | Id | Name |Price | | 002 | Student Monthly Pass | 76 |

| 100 | One Day Pass | 6 | | 202 | Student Booklet of | 15 |

| | 10 Single tickets | 15 |

Restriction (Performance)Measure: Response time must be smaller than 10 secondsRecovery: Log issue and notify the user that the query cannot be completed

Restriction (Security)Measure: User must be authenticatedRecovery: Log issue and redirect to login page

Page 22: Adressing requirements with agile practices

Breaking down the scopeFrom Fuzzy to Accurate

User Story

Scenario

Restriction

Recovery

TestRestrictio

nScenario

Rules

Page 23: Adressing requirements with agile practices

Confirm Non-Functional RequirementsRules with collaborative construction

• Pair programming• Two teammates work together at one

workstation• Driver

• Type at the keyboard• Focus his attention on the task at hand• Use the observer as a safety net and guide

• Observer• Look at what is produced by driver• Consider the constraints imposed by the rules• Come up with ideas for improvements

• The two teammates switch roles frequently

Page 24: Adressing requirements with agile practices

Confirm Non-Functional RequirementsRules with collaborative construction

• Peer review (aka formal inspection during construction)• Well-defined roles

• Moderator, author, reviewers• Planning

• Inspection is scheduled by moderator (from code analysis measure)• Preparation

• Reviewer works alone to scrutinize the work product under review• Reviewer uses the rule definition to stimulate their examination

• Inspection• Moderator chooses someone other than the author to present the work

product • Author is a « fly on the wall » and scribe records reworks as they are detected• Constructive feedbacks, « I would replace with … », Emphasis is on improving

knowledge • After inspection

• Moderator is responsible for seeing that all rework is carried out promptly by the author

Page 25: Adressing requirements with agile practices

Confirm Non-Functional RequirementsConfirm restrictions with tests

• Correctness: Acceptance testing• Performance: Response time or throughput testing• Reliability: Testing over a period of time (memory

leaks ???)• Robustness: Simulate broken component• Scalability: Load testing (with growing amounts of

work)• Security: Intrusion testing• Usability: Testing with real users

Page 26: Adressing requirements with agile practices

Confirm Non-Functional RequirementsTesting restriction is costly

• Negotiate with stakeholders to reduce number of restrictions• Is it « really, really » a desirable outcome?

• Target a specific iteration for testing a non-functional requirement• Benefit: Transform from a recurrent concern to a

one-time concern• Benefit: Handle the concern with a user story

Page 27: Adressing requirements with agile practices

Confirm Non-Functional Requirements

• Each scenario is not « Done » until • Each rule is confirmed• Each restrictions is tested• Each recovery is tested

• Each user story is not « Done » until • Each rule is confirmed• Each tests

Page 28: Adressing requirements with agile practices

Next Steps

• Add ‘Scenario’, ‘Rule’ and ‘Restriction’ Work Item Type to your TFS

• Improve internal quality using rules• Create global rules for scenario and user story• Enforce rules with collaborative construction

• Improve external quality using restrictions• Create specific restrictions for each scenario• Enforce restrictions with tests

Page 29: Adressing requirements with agile practices

Resources

• Training about Agile Specification and TFS• http://mariocardinal.com

• Book• Title: Agile Specification• Author: Mario Cardinal• Publisher: Addison-Wesley• Publication Date: Spring 2012

Page 30: Adressing requirements with agile practices

Q & A