Software Requirement Analysis and Specification
Software Requirement Analysis and Specification
Requirements
Elicitation
Requirement
Requirement
Requirements
Engineering Analysis
Engineering
Requirements
Documentation
Requirements
Review
SRS
Crucial Process Steps of requirement engineering
4
Crucial Process Steps of
Requirement Engineering
Requirement Elicitation: This is also known as gathering
of requirements .(information from customers and existing
system processes)
Requirement Analysis: The requirements are analyzed in
order to identify inconsistencies , defects , omissions etc.
Requirement Documentation : This is the end product
of requirement elicitations and analysis. The document is
known as Software Requirement Specification (SRS).
Requirement Review: The review process is carried out
to improve the quality of the SRS. It may also be called as
Requirement Verification :
Requirement Engineering
Requirement Engineering is the disciplined application of
proven principles, methods, tools, and notations to describe a
proposed system’s intended behavior and its associated
constraints.
SRS may act as a contract between developer and customer.
State of practice
Requirements are difficult to uncover
• Requirements change
• Over reliance on CASE Tools
• Tight project Schedule
• Communication barriers
• Market driven software development
• Lack of resources
6
Requirement Engineering
Example
7
Types of Requirements
Types of Requirements
Requirements
Functional Non-Functional
8
Types of Requirement
Known Requirements:- Something a stakeholder
believes to be implemented .
Unknown Requirements : Forgotten by the
stakeholder because they are not needed right now
or needed only by another stakeholder.
Undreamt Requirements : Stakeholder may
not be able to think of new requirements due
to limited domain knowledge.
Types of Requirements
Functional requirements describe what the software has to
do. They are often called product features.
Non Functional requirements are mostly quality
requirements. That stipulate how well the software does,
what it has to do.
Availability
Reliability For Users
Usability
Flexibility
Maintainability
Portability For Developers
Testability
10
Functional Requriements
Any requirement which specifies what the system should do.
A functional requirement will describe a particular behavior of function of the
system when certain conditions are met, for example: “Send email when a
new customer signs up” or “Open a new account”.
Administrative functions
Authentication
Authorization levels
Audit Tracking
External Interfaces
Certification Requirements
Reporting Requirements
Historical Data
13
Types of Requirements
Interface Specification
• Important for the
customers.
TYPES OF INTERFACES
• Procedural interfaces procedures are also
called as Application Programming Interface (APIs)
• Data structures : are used to transfer data from one
module to another module
• Representation of data: Ordering of Bits
14
Feasibility Study
Is cancellation of a project a bad news?
As per IBM report, “31% projects get cancelled before
they are completed, 53% over-run their cost estimates by
an average of 189% & for every 100 projects, there are
94 restarts.
15
Feasibility Study
Feasibility depends upon non technical Issues like:
16
Feasibility Study
Purpose of feasibility study
17
Feasibility Study
Focus of feasibility studies
18
Requirements Elicitation
Perhaps
•Most difficult
• Most critical
• Most error prone
•Most communication intensive
Succeed
20
Requirements Elicitation
Types of questions.
Any problems with existing system
Any Calculation errors
Possible reasons for malfunctioning
No. of Student Enrolled
21
Requirements Elicitation
2. Brainstorming Sessions
It is a group technique
group discussions
Categorized
Prioritized Pruned
*Idea is to generate views ,not to vet them.
22
Requirements Elicitation
A Facilitator may handle group bias, conflicts
carefully.
23
Requirements Elicitation
Guidelines
1. Arrange a meeting at a neutral site.
2. Establish rules for participation.
3. Informal agenda to encourage free flow of ideas.
4. Appoint a facilitator.
5. Prepare definition mechanism board, worksheets,
wall stickier.
6. Participants should not criticize or debate.
24
Requirements Elicitation
1. Part of environment that surrounds the system.
2. Produced by the system.
3. Used by the system.
A. List of constraints
B. Functions
C. Performance criteria
Activities of FAST session
1. Every participant presents his/her list
2. Combine list for each topic
3. Discussion
4. Consensus list
5. Sub teams for mini specifications
6. Presentations of mini-specifications
7. Validation criteria
8. A sub team to draft specifications
25
Requirements Elicitation
4. Quality Function Deployment
-- Incorporate voice of the customer
Technical requirements.
Documented
Prime concern is customer satisfaction
What is important for customer?
-- Normal requirements
-- Expected requirements
-- Exciting requirements
26
Requirements Elicitation
Steps
1. Identify stakeholders
2. List out requirements
3. Degree of importance to each
requirement.
27
Requirements Elicitation
5. The Use Case Approach
The terms
Use Case
Use Case Often Interchanged
Scenario Use
But they are
Case Diagram
different
Use Cases are structured outline or template for the
description of user requirements modeled in a
structured language like English.
28
Requirements Elicitation
Use case Scenarios are unstructured
descriptions of user requirements.
29
Requirements Elicitation
• Cockburn between Primary and
distinguishes secondary
actors.
• A Primary actor is one having a goal
requiring the assistance of the system.
Use Cases
A use case is initiated by a user with a particular goal in
mind, and completes successfully when that goal is
satisfied.
30
Requirements Elicitation
* It describes the sequence of interactions between
actors and the system necessary to deliver the
services that satisfies the goal.
* Alternate sequence
* System is treated as black box.
Thus
Use Case captures who (actor) does what (interaction)
with the system, for what purpose (goal), without dealing
with system internals.
31
Requirements Elicitation
*defines all behavior required of the system,
bounding the scope of the system.
Jacobson & others proposed a template for writing
Use cases as shown below:
1. Introduction
Describe a quick background of the use case.
2.Actors
List the actors that interact and participate in the
use cases.
3.Pre Conditions
Pre conditions that need to be satisfied for the use
case to perform.
4. Post Conditions
Define the different states in which we expect the system
to be in, after the use case executes.
32
Requirements Elicitation
5. Flow of events
1. Basic Flow
List the primary events that will occur when this use case is executed.
2. Alternative Flows
Any Subsidiary events that can occur in the use case should be
separately listed. List each such event as an alternative flow.
A use case can have many alternative flows as required.
6.Special Requirements
Business rules should be listed for basic & information flows as special
requirements in the use case narration .These rules will also be used
for writing test cases. Both success and failures scenarios should be
described.
7.Use Case relationships
34
Requirements Elicitation
Use case Diagrams
-- represents what happens when actor interacts with a
system.
-- captures functional aspect of the system.
*Use Cases are for “what” the system is , not “how” the
system will be designed
Maintain
Subject
Details
Data Entry
Operator Maintain
Result
Details
Login
Administrator/
DR Generate
Result
Reports
View Results
Student/Teacher
Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age 37
International Publishers, 2007
Requirements Elicitation
1. Maintain student Details
Add/Modify/update students details like name, address.
2.Maintain subject Details
Add/Modify/Update Subject information semester wise
3.Maintain Result Details
Include entry of marks and assignment of credit points for each
paper.
4. Login
Use to Provide way to enter through user id & password.
5. Generate Result Report
Use to print various reports
6. View Result
(i) According to course code
(ii) According to Enrollment number/roll number
38
Requirements Analysis
We analyze, refine and scrutinize requirements to
make consistent & unambiguous requirements.
Steps Draw the context
Diagram
Develop prototype
(optional)
Model the
Requirements
Finalize the
Requirements
Requirements Analysis Steps
39
Requirements Analysis
Administrator Marks Entry
Subject Information Operator
Entry
40
Requirements Analysis
Data Flow Diagrams
41
Requirements Analysis
Symbol Name Function
Source or sink A source of system inputs or
sink of system outputs
Data Store A repository of data, the
arrowhead indicate net
input and net outputs
to store
Leveling
DFD represent a system or software at any level
of abstraction.
Includes :
Name of data item
Aliases (other names for items)
Description/Purpose
Related data items
Range of values
Data flows
Data structure
definition
43
Data Dictionaries
Notation Meaning
Entities
Fundamental thing about which data may be
maintained. Each entity has its own identity.
POLICY
CUSTOMER
home Automobile individual businesses
POLICY CUSTOMER
46
Entity-Relationship Diagrams
Relationships
A relationship is a reason for associating two entity types.
Binary relationships involve two entity types
Made
Agains
t
POLICY
Relationships added to CLAIM
ERD 47
Entity-Relationship Diagrams
A training department is interested in tracking which
training courses each of its employee has completed.
48
Entity-Relationship Diagrams
Degree of relationship
Unary Ternary
Binary
Unary relationship Is
Person Married
to
One to many
49
Entity Relationship Diagram
Binary Relationship
Entity-Relationship Diagrams
Ternary relationship
Part
Is
Movie Stocked Video Tape
as
51
Entity-Relationship Diagrams
Minimum cardinality is the minimum number of instances
of entity B that may be associated with each instance of
entity A.
Is
MOVIE Stocked VIDEO TAPE
As
52
Entity-Relationship Diagrams
Attributes
Attribute
53
Entity-Relationship Diagrams
A candidate key is an attribute or combination of attributes
that uniquely identifies each instance of an entity type.
Identifier
54
Entity-Relationship Diagrams
Name Address
Vendors quote prices for several parts along with quantity of parts.
Draw an E-R diagram.
Quote-
Vendor price
Parts
quantity price
55
Requirements Documentation
This is the way of representing requirements in
a consistent format
-- written by customer
-- written by
developer
Serves as contract between customer &
developer.
56
Requirements Documentation
Nature of SRS
Basic Issues
• Functionality
• External Interfaces
• Performance
• Attributes
• Design constraints imposed on an
Implementation
57
Requirements Documentation
SRS Should
-- Correctly define all requirements
-- not describe any design details
-- not impose any additional
constraints
Characteristics of a good SRS
An SRS Should be
✓ Correct
✓ Unambiguous
✓ Complete
✓ Consistent
58
Requirements Documentation
✓ Ranked for important and/or stability
✓ Verifiable
✓ Modifiable
✓ Traceable
59
Requirements Documentation
Correct
An SRS is correct if and only if
every requirement stated therein is one that the
software shall meet.
Unambiguous
An SRS is unambiguous if every
and only if, requirement stated therein has only
one interpretation.
Complete
An SRS is complete if and
only if, it includes the following elements
Consistent
Modifiable
An SRS is modifiable, if and only if, its structure and style
are such that any changes to the requirements can be made
easily, completely, and consistently while retaining structure and
style.
Traceable
An SRS is traceable, if the origin of each of the
requirements is clear and if it facilitates the referencing of
each requirement in future development or enhancement
documentation.
62
Requirements Documentation
Organization of the SRS
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definition, Acronyms and
1.4 abbreviations References
1.5 Overview
63
Requirements Documentation
2. The Overall Description
2.1 Product
2.1.1
Perspective System Interfaces
2.1.2 Interfaces
2.1.3 Hardware
2.1.4 Interfaces
2.1.5 Software Interfaces
2.1.6 Communication
2.1.7 Interfaces Memory
2.1.8 Constraints Operations
Site Adaptation
Requirements
64
Requirements Documentation
2. Product Functions
3. User Characteristics
4. Constraints
5. Assumptions for dependencies
6. Apportioning of requirements
3. Specific Requirements
1. External Interfaces
2. Functions
3. Performance requirements
4. Logical database requirements
5. Design Constraints
6. Software System attributes
7. Organization of specific requirements
8. Additional Comments.
65
Requirements Validation
Check the document for:
✓ Completeness &
consistency
✓ Conformance to standards
✓ Requirements conflicts
✓ Technical errors
✓ Ambiguous requirements
66
Requirements Validation
SRS document
List of problems
Validatio
Organizational
n
standards
process
67
Validation Vs Verification
Validation Verification
Are we building the right system? Are we building the system right?
Validation is the process of evaluating software at Verification is the process of evaluating products
the end of the development process to determine of a development phase to find out whether they
whether software meets the customer expectations meet the specified requirements.
and requirements.
The objective of Validation is to make sure that the The objective of Verification is to make sure that
product actually meet up the user’s requirements, the product being develop is as per the
and check whether the specifications were correct requirements and design specifications.
in the first place.
Following activities are involved in Validation: Following activities are involved in Verification:
Testing like black box testing, white box testing, Reviews, Meetings and Inspections.
gray box testing etc.
Validation process describes whether the software Verification process explains whether the outputs
is accepted by the user or not. are according to inputs or not.
Cost of errors caught in Validation is more than Cost of errors caught in Verification is less than
errors found in Verification. errors found in Validation.