SE Unit 3 Learning Material
SE Unit 3 Learning Material
SE Unit 3 Learning Material
Syllabus:
Software requirement analysis and specification
Value of good SRS, requirement process, Requirement specification, functional specification with use
cases.
Learning Material
Advantages of SRS
An SRS establishes the basis for agreement between the client and the supplier on
what the software product will do.
This basis for agreement is frequently formalized into a legal contract between the
client (or the customer) and the developer (the supplier).
So, through SRS, the client clearly describes what it expects from the supplier, and
the developer clearly understands what capabilities to build in the software.
An SRS provides a reference for validation of the final product.
The SRS helps the client determine if the software meets the requirements.
Without a proper SRS, there is no way a client can determine if the software being
delivered is what was ordered, and there is no way the developer can convince the
client that all the requirements have been fulfilled.
Providing the basis of agreement and validation should be strong enough reasons for
both the client and the developer to do a thorough and rigorous job of requirement
understanding and specification.
If we want a high-quality end product that has few errors, we must begin with a high-
quality SRS.
A high-quality SRS is a prerequisite to high-quality software.
Finally, the quality of SRS has an impact on cost (and schedule) of the project.
We know that errors can exist in the SRS. It is also known that the cost of fixing an
error increases almost exponentially as time progresses.
Hence, by improving the quality of requirements, we can have a huge savings in the
future by having fewer expensive defect removals.
A high-quality SRS reduces the development cost.
The quality of the SRS impacts Customer satisfaction , system validation, Quality of
the final software and the software development cost.
Requirement Process
The requirement process is the sequence of activities that need to be performed in the
requirements phase and that culminate in producing a high-quality document
containing the SRS.
The requirements process typically consists of three basic tasks:
1. Problem or Requirement Analysis
2. Requirements Specification
3. Requirements Validation.
It is not a linear sequence of activities, from the specification activity we may go back
to the analysis activity.
The process of specification frequently shows shortcomings in the knowledge of the
problem, thereby necessitating further analysis.
Once the specification is done, it goes through the validation activity.
This activity may reveal problems in the specification itself, which requires going
back to the specification step, or may reveal shortcomings in the understanding of the
which requires going back to the analysis activity.
Requirements Specification
The transition from analysis to specification should also not be expected to be
straightforward, even if some formal modeling is used during analysis.
A good SRS needs to specify many things, some of which are not satisfactorily
handled during analysis.
Essentially, what passes from requirements analysis activity to the specification
activity is the knowledge acquired about the system.
The modeling is essentially a tool to help obtain a thorough and complete knowledge
about the proposed system.
The SRS is written based on the knowledge acquired during analysis.
As converting knowledge into a structured document is not straightforward,
specification itself is a major task, which is relatively independent.
Characteristics of an SRS
An SRS should have certain properties and should contain different types of
requirements.
These are:
1. Correct
2. Complete
3. Unambiguous
4. Verifiable
5. Consistent
6. Ranked for importance and/or stability
7. Modifiable
8. Traceable
1. Correct:
An SRS is correct if every requirement included in the SRS represents
something required in the final system.
2. Complete:
It is complete if everything the software is supposed to do and the responses of
the software to all classes of input data are specified in the SRS.
3. Unambiguous:
It is unambiguous if and only if every requirement stated has one and only one
interpretation.
Requirements are often written in natural language, which is inherently
ambiguous.
4. Verifiable:
only if every stated requirement is verifiable.
A requirement is verifiable if there exists some cost-effective process that can
check whether the final software meets that requirement.
5. Consistent:
If there is no requirement that conflicts with another.
There may be logical or temporal conflict between requirements that causes
inconsistencies.
This occurs if the SRS contains two or more requirements whose logical or
temporal characteristics cannot be satisfied together by any software system.
6. Ranked for importance and/or stability :
An SRS is ranked for importance and/or stability if for each requirement the
importance and the stability of the requirement are indicated.
Stability of a requirement reflects the chances of it changing in the future.
It can be reflected in terms of the expected change volume.
7. Modifiable
An SRS is modifiable if its structure and style are such that any necessary
change can be made easily while preserving completeness and consistency.
Presence of redundancy is a major reason to modifiability, as it can easily lead
to errors.
For example, assume that a requirement is stated in two places and that the
requirement is later needs to be changed.
If only one occurrence of the requirement is modified, the resulting SRS will
be inconsistent.
8. Traceable
An SRS is Traceable if the origin of each of its requirements is clear and if it
facilitates the referencing of each requirement in future development.
Forward traceability means that each requirement should be traceable to some
design and code elements.
Backward traceability requires that it be possible to trace design and code
elements to the requirements they support.
Traceability aids verification and validation.
Components of an SRS
Completeness of specifications is difficult to achieve and even more difficult toverify.
The basic issues an SRS must address are:
Functionality
Performance
Design constraints imposed on an implementation
External interfaces
Basics
A software system may be used by many users, or by other systems.
In use case terminology,
An actor is a person or a system which uses the system for achieving some
goal.
An actor interacts for achieving some goal, it is a logical entity that represents
a group of users who behave in a similar manner.
Different actors represent groups with different goals.
So, it is better to have a “receiver” and a “sender” actor rather than having a
generic “user” actor for a system in which some messages are sent by users
and received by some other users.
Extensions
Besides specifying the primary actor, its goal, and the success and exceptional
scenarios, a use case can also specify a scope.
If the system being built has many subsystems,sometimes system use cases may
actually be capturing the behavior of some subsystem
In such a situation it is better to specify the scope of that use case as the subsystem.
For example, a use case for a system may be log in.
Even though this is a part of the system, the interaction of the user with the
system described in this use case is limited to the interaction with the “login
and authentication” subsystem
If “login and authentication” has been identified as a subsystem or a
component, then it is better to specify it as the scope.
UCs where the scope is the enterprise can often run over a long period of time
(e.g., process an application of a prospective candidate).
These use cases may require many different systems to perform different tasks
before the UC can be completed.
Failure conditions
Once the success scenario is listed, all the possible failure conditions can be
identified.
At this level, for each step in the main success scenario, the different ways in which a
step can fail form the failure conditions.
Before deciding what should be done in these failure conditions, it is better to
enumerate the failure conditions and review for completeness.
Failure handling
Often the focus is so much on the main functionality that people do not pay attention
to how failures should be handled.
Determining what should be the behavior under different failure conditions will often
identify new business rules or new actors.
And overall functionality or capabilities of the system, actors and goal-level
description is very useful.
Failure conditions, on the other hand, are very useful for understanding and extracting
detailed requirements and business rules under special cases.
These four levels can also guide the analysis activity.
A step-by-step approach for analysis when employing use cases is:
Step 1:
Identify the actors and their goals and get an agreement with the
concerned stakeholders as to the goals.
The actor-goal list will clearly define the scope of the system and will
provide an overall view of what the system capabilities are.
Step 2:
Understand and specify the main success scenario for each UC, giving
more details about the main functions of the system.
Interaction and discussion are the primary means to uncover these
scenarios though modelsmay be built, if required.
During this step, the analyst may uncover that to complete some use
case some other use cases are needed, which have not been identified.
In this case, the list of use cases will be expanded.
Step 3:
When the main success scenario for a use case is agreed upon and the
main steps in its execution are specified, then the failure conditions can
be examined.
Enumerating failure conditions is an excellent method of uncovering
special situations that can occur and which must be handled by the
system.
Step 4:
Finally, specify what should be done for these failure conditions.
As details of handling failure scenarios can require a lot of effort and
discussion, it is better to first enumerate the different failure conditions
and then get the details of these scenarios.
At any step an analyst may have to go back to earlier steps as during some detailed
analysis new actors may emerge or new goals and new use cases may be uncovered.
For writing use cases, general technical writing rules apply.
Use simple grammar, clearly specify who is performing the step, and keep the overall
scenario as simple as possible.
Also, when writing steps, for simplicity, it is better to combine some steps into one
logical step, if it makes sense.
For example, steps “user enters his name,” “user enters his SSN,” and “user enters his
address” can be easily combined into one step “user enters personal information.”
Assignment-Cum-Tutorial Questions
I) Objective Questions
1) Explain briefly the value of good SRS and the Requirements Engineering Process.
2) Give the Structure of Software Requirements Document.
3) Describe the Functional Specification Technique with use cases.
4) What is SRS? Discuss the characteristics of SRS.