Sunday, June 18, 2017

Requirements, Acceptance Criteria, and Scenarios

What they are?, How they differ?, How they are related?

Context

We are building a very basic calculator, one that only supports the four basic operations: Addition, Subtraction, Multiplication, and Division.

Requirements

(from the SWEBOKv3 @ http://www4.ncsu.edu/~tjmenzie/cs510/pdf/SWEBOKv3.pdf)

What they are?

- At its most basic, a software requirement is a property that must be exhibited by something in order to solve some problem in the real world.

What they do?

- Express the needs and constraints placed on a software product that contribute to the solution of some real-world problem.

Properties:
  • An essential property of all software requirements is that they be verifiable as an individual feature as a functional requirement or at the system level as a nonfunctional requirement.
  • Priority rating
  • Uniquely identified

Types (Categories) of Requirements

  • Product: A product requirement is a need or constraint on the software to be developed (for example, “The software shall verify that a student meets all prerequisites before he or she registers for a course”).
  • Process: A process requirement is essentially a constraint on the development of the software (for example, “The software shall be developed using a RUP process”).
  • Functional: Functional requirements describe the functions that the software is to execute; for example, formatting some text or modulating a signal. They are sometimes known as capabilities or features. A functional requirement can also be described as one for which a finite set of test steps can be written to validate its behavior.
  • Nonfunctional: nonfunctional requirements are the ones that act to constrain the solution. Nonfunctional requirements are sometimes known as constraints or quality requirements.

Examples

We're going to map each of the basic arithmetic operations to a single requirement, so we'll have:
  • Req-1: The calculator must support the Addition operation.
  • Req-2: The calculator must support the Subtraction operation.
  • Req-3: The calculator must support the Multiplication operation.
  • Req-4: The calculator must support the Division operation.

Acceptance Criteria

Set of statements indicating how to judge if a given [software] component or system satisfies certain requirement. Each element, criterion, is an specific statement.

Examples

We, as math experts, know that these operations have certain "properties". We can think of these properties as rules or statements that further define some aspect of the requirement (arithmetic operation). So, now we'll take the Addition as the subject of our examples. We'll have one Criterion for each of the Addition Operation's properties.
  • Cri-1-1: The calculator must comply with the Commutative property for the Addition operation.
  • Cri-1-2: The calculator must comply with the Associative property for the Addition operation.
  • Cri-1-3: The calculator must comply with the Identity property for the Addition operation.
  • Cri-1-4: The calculator must comply with the Distributive property, respect to the Multiplication, for the Addition operation.

Scenarios

Set of concrete examples used to validate a single Acceptance Criteria.

Examples

Now we'll take the Commutative property for the Addition operation, as the subject of our examples of Scenarios. What we need are concrete Addition expressions that validate the "presence", or "proper implementation" of the Commutative property (Acceptance Criterion) for the Addition operation (Requirement).
  • Sce-1-1-1: 4 + 2 = 2 + 4
  • Sce-1-1-2: 10 + 5 = 5 + 10
  • Sce-1-1-3: 1 + 2 + 3 = 3 + 2 + 1

A picture is worth a thousand words

Here is a breakdown structure of these three concepts:


Requirements, Acceptance Criteria, and Scenarios breakdown




Summary

What they are? see above definitions.

How they differ? 
Requirements are high level descriptions of system characteristics. Acceptance Criteria are elements used to comply with the "verifiable" property of requirements. Criteria must state how to determine if the software system had properly implemented the requirement.

Often, acceptance criteria are not detailed enough to be useful in practice, so we need concrete examples of Input-Output,  Input-Response Time, etc.; those are the Scenarios.

How are related?
From the above descriptions, you can infer that they are three levels of details of the same thing: what we expect the system to do.

But, what's the deal with all this?
  • All actors of the SDLC process must understand what are, how they differ, and why are all three levels required.
  • Requirements / User Stories, without Criteria and Scenarios will be to subjective to be verifiable.
  • Criteria and Scenarios alone, will be too difficult to manage, without a grouping element (parent requirement).
The usage of all three levels bring a lot of benefits, such as better effort estimation of Stories, Criteria, and Tasks. They also bring some challenges about how to express, document and/or automate those validations. We can review all this in another article, here I just wanted to point out their difference and give some simple examples of each one.

No comments:

Post a Comment

enter your comments here...

Subscribe to our mailing list

* indicates required
Email Format