23
FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Embed Size (px)

Citation preview

Page 1: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

FUNCTIONAL &

NON-FUNCTIONAL REQUIREMENTS

Lecture 6

Page 2: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

Tentative Schedule

Week# Date Time Topics Activites

7 18 Mar

1700-1815

Lecture#6 Functional & Non Functional Requirements Lecture,

1845-2000 Tutorial automated tool, Paper Showing Score card

8 25 Mar 1700--2000 Lecture #7 Requirements for critical systems Assignment 3

9 1 Apr 1700-2000 Lecture #8 Requirements validation

 

Assignment Submission

10 8 Apr 1700-2000 Lecture #9 Requirements Management Assignment 4

11 15 Apr

1700-1815

Lecture#10 Agile Software Requirements 

1845-2000 DiscussionAssignment Submission

12 22 Apr  2nd OHT

Page 3: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

3

Classification of Requirements

Requirements are commonly classified as (IEEE std 830, 1998): Functional:

A requirement that specifies an action that a system MUST be able to perform, without considering physical constraints

A requirement that specifies input/output behavior of the system Non-Functional:

A requirement that specifies system PROPERTIES, such as environmental and implementation constraints, performance, dependencies, maintainability, extensibility and reliability.

Often classified as: Performance Requirements External interface requirements Design constraints Quality attributes

Page 4: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

4

Requirements

General: What is the overall scope of the project from a requirements

perspective? Example: A solution is required that allows users to maintain customers and

contact with those customers by salespeople.

Business: What specific capabilities must the whole solution deliver to the

Business? Example: Users must be able to create a record of contact with a customer

by a salesperson.

Functional: What specific capabilities must the computerised part of the solution

deliver? Example: The system will provide the ability to record details of contacts with

a customer by a salesperson.

Page 5: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

5

Requirements

Detailed: What business rules are to be enforced by the solution?

Example: A customer can not be deleted if they have had any contact with salespeople in the last 6 years.

Non-Functional: What requirements exist that do not fall in to any of the other categories?

Example: The system must support up to 150 concurrent users.

Data: What rules must the data enforce?

Example: A customer can have many contacts by a salesperson.

Technical: What technical constraints must the solution abide by? Often

documented as a constraint rather than requirement… Example: The system will be developed using object orientated standards.

Page 6: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

6

Requirements Overview

A requirement is a statement of one of the following: What a system must do A known limitation or constraint on resources or

design How well the system must do what it does

The first definition is for Functional Requirements The second and third definitions are for Non-

Functional Requirements (NFRs) Curtsy Intel Corporation.

Page 7: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>

7

Advanced Software Requirements Engineering: MSCS- 20

Examples of Functional and Non-Functional Requirements

Add Participants Drop Participants Count Participants Mute Microphone Invite/prompt Operator

Voice/ Video quality Reliability Availability Ease of use Cost Localization

Functional Requirements Non-Functional Requirements

VOIP (conference call Project)

Page 8: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

8

Functional Requirements

A Functional Requirement: is a statement of what a system must do (#1) is measured in “yes” or “no” terms usually employs the word “shall”

Examples: Add Participant

“The software shall display an option to add a participant” Invite/prompt Operator

“The software shall invite/prompt the operator if the participant clicks the Operator Help icon.”

Page 9: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

9

Functional Requirements

Functional requirements define the required behavior of the system to be built. Statements of services the system should provide

Reaction to particular inputs Behavior in particular situations

Statements describing what the system does Functionality of the system Abnormal behavior is also documented as functional

requirements in the form of exception handling Functional requirements should be complete,

unambiguous and consistent

• Customers and developers usually focus all their attention on functional requirements

Page 10: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

10

Non Functional Requirements

Non-functional requirements specify additional properties of the system to be built, other than functionality.

Most non-functional requirements relate to the system as a whole. They include constraints on timing, performance, reliability,

security, maintainability, accuracy, the development process, standards, etc.

Non-functional requirements can be subcategorized such as: External interface requirements, performance requirements,

design constraints, logical database requirements, and “characteristics”

Page 11: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

11

Non Functional Requirements

A Non-Functional Requirement: is a known limitation or constraint on resources or design

(#2) usually measured in yes/no terms can include documentation, marketing collateral, product

localization, legal compliance restrictions typically employs the word “must”

Examples: Cost

“The retail cost of the software must be between $175 and $199.” Localization

“The help file must be released in English, French and Spanish.”

Page 12: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

12

Non Functional Requirements

A Non-Functional Requirement: is a measure of how well the system must do what it

does (#3) Is measured over an interval or range usually employs the word “must” includes the “ilities” (e.g., quality, reliability,

scalability, availability) This type of requirement is problematic within

most RE practices.

• it is the responsibility of the architect to work with the stakeholders of the system to define and baseline a quality of service measurement for each of the service level requirements.

• The architecture must address all the non functional requirements.

Page 13: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

13

Types of Non-functional requirements

The ‘IEEE-Std 830 - 1993’ lists 13 non-functional requirements to be included in a Software Requirements Document. Performance requirements

Interface requirements Operational requirements Resource requirements Verification requirements Acceptance requirements

Documentation requirements Security requirements Portability requirements Quality requirements Reliability requirements Maintainability requirements Safety requirements

Page 14: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

14

What Functional Requirements Are Not

The functional requirements sections of specifications often tend to be “lists” of statements in the form: “the system shall…” relating to “capabilities” of the

system, not functions. For example, “the system shall have the capability to

update an inventory database.” Or, “the system shall have the capability to retrieve inventory

information and present it to the user.”

Any Problem here? Both are not functional requirements at all… Why???

• The inputs are missing from the statement!• You may say, “It is obvious, the system will update the

inventory when it receives an update transaction from the users.” • You may be right, but it isn’t stated explicitly.

• The statements are also incomplete: • They do not specify which data elements will be

updated, or retrieved, or presented to the user. • They also do not say what the system is required to do

if, say, the information to be updated or retrieved is missing from the database.

• Because the inputs are missing, the statements are inherently un-testable as well. • So, when the system test team, or the acceptance test

team, starts to develop test scenarios, the team members will likewise make assumptions that may vary with the users’ intent.

Page 15: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

15

Examples and comments (FRs)

The system shall solve a quadratic equation using the following formula

x = (-b+sqrt(b2 – 4*a*c))/2*a

• Notice the ambiguity in the requirement for solving the quadratic equation.

• The requirement does not speak about the possibility when the value of ‘a’ is zero

• x = (-b+sqrt(b2 – 4*a*c))/2*a

• The system shall provide appropriate viewers for the user to read documents in the document store• Notice the ambiguity in the requirement, which uses the term ‘appropriate viewers’

• This requirement does not mention the formats of documents and types of viewers, which can be used

• Incomplete and ambiguous requirements are open to multiple interpretations and assumptions

• This can lead to the development of poor quality, or faulty, software products

Page 16: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

16

Examples and comments (NFRs)

NFRs Product Requirements

Usability, efficiency, reliability, portability, proficiency requirements

Organizational Requirements Standard, implementation, delivery requirements

External Requirements Interoperability, ethical, legislative, safety requirements

Product Requirements The system shall allow one hundred thousand hits

per minute on the website The system shall not have down time of more than

one second for continuous execution of one thousand hours

Organizational Requirements • The system development process and deliverable

documents shall conform to the MIL-STD-2167A• Any development work sub-contracted by the

development organization shall be carried out in accordance with Capability Maturity Model

External Requirements • The system shall not disclose any personal

information about members of the library system to other members except system administrators

• The system shall comply with the local and national laws regarding the use of software tools

Non-functional requirements should be written in a quantitative manner as much as possible, which is not always easy for customers

For some goals, there are no quantitative measures, e.g., maintainability

Page 17: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

17

Challenges of NFRs

NFRs are difficult to express A number of important issues contribute to the problem of

expressing non-functional requirements: Certain constraints are related to the design solution that is

unknown at the requirements stage

Certain constraints, are highly subjective and can only be determined through complex empirical evaluations

Non-functional requirements tend to be related to one or more functional requirements

Non-functional requirements tend to conflict and contradict

There are no ‘universal’ rules and guidelines for determining when non-functional requirements are optimally met.

Page 18: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

18

Representation

Natural language is unconstrained, informal language as it is used in every day speech and writing (e.g., email) Natural language is the most common medium for

expressing requirements in most industries; It is flexible, easy to use and requires no additional training.

Exercise Write 3-4 natural language non-functional

requirements for the purchase of a new car. Example: The car must be reliable.

Page 19: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>

19

Advanced Software Requirements Engineering: MSCS- 20

Weak Words in NL

Quick, Quickly Easy, Easily Timely Fast Normal Reliable State-of-the-art Effortless

Fast Frequently Intuitive Feel, Feeling Effortless Friendly, User-friendly Secure Immediate

Weak words are subjective or lack a common or precise definition. Examples include:

This is just a partial list. Don’t use weak words – define what you mean using precise, measurable terms

Page 20: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

20

Un bounded List

An unbounded list is one that lacks a starting point, an end point, or both, Examples include: At least Including, but not limited to Or later Such as

Unbounded lists are impossible to design for or to test against For example, how would you design and test a system that “must maintain a list of at least 250 users”?

Or, how would you test software that “must install on Windows Vista or later in under 5 seconds”?

Page 21: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

21

Ambiguity

Ambiguity occurs when a word or statement has multiple meanings or there is doubt about the meaning. These problems (and others) create ambiguity: Vagueness Subjectivity Optionality Under-specification Under-reference

Ambiguity leads to differences in interpretation amongst various stakeholders for a requirement.

Page 22: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

22

Implicit Collections

Often, collections of objects within requirements are not explicitly defined anywhere Without a definition, readers may assume an incorrect meaning

Example: “The software must support 802.11 and other network

protocols supported by competing applications under Linux.” What is counted as a “competing application”? What belongs to the collection of “other network protocols”? What specific protocols of 802.11 are included? “Linux” is also a collection of OS vendors, versions, and

revision levels

Page 23: FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS Lecture 6

Asst Prof Athar Mohsin-MCS NUST<[email protected]>Advanced Software Requirements Engineering: MSCS- 20

23

References

‘Requirements Engineering: Processes and Techniques’ by G. Kotonya and I. Sommerville, John Wiley & Sons, 1998

Software Engineering 9th Edition, by I. Sommerville, Software Engineering 8th Edition, by R. Pressman Specifying Effective Non-Functional Requirements by John

Terzakis, Intel Corporation, June 24, 2012, ICCGI Conference, Venice, Italy (special thanks)