RE CH 1
RE CH 1
RE CH 1
Introduction to Requirements
Engineering
1
What is a requirement?
The software requirements are description of features and
functionalities of the target system.
Something required, something wanted or needed.
– Webster’s dictionary
• There is a huge difference between wanted and
needed and it should be kept in mind all the time.
Requirements convey the expectations of users from the
software product.
• The requirements can be obvious or hidden, known or
unknown, expected or unexpected from client’s point of view.
• Requirements form the basis of all software engineering
projects.
2
Cont’d…
Requirements are defined during the early stages of a
system development
• as a specification of what should be implemented or as a
constraint of some kind on the system.
Requirements may be:
– a user-level facility description,
– a detailed specification of expected system behavior,
– a general system property,
– a specific constraint on the system,
– information on how to carry out some computation,
– A constraint on the development of the system.
3
Cont’d…
Example:
• “Write a program that will read in a list of 100 positive
integers, sort them in ascending order, display the sorted list
and display the average of the numbers”
Requirements:-
Read in a list of 100 positive integers
Sort the list of integers in ascending order
Display the average of the numbers
4
Types of requirements
– User requirements
– System requirements
• Software specifications – provide more (design) detail
5
Cont’d…
User requirements
• Should describe functional and non-functional requirements
so that they are understandable by system users who don’t
have detailed technical knowledge
• User requirements are defined using natural language,
tables, and diagrams
Problems with natural language
• Precision vs. understandability
• Functional vs. non-functional requirements confusion
• Requirements amalgamation
6
Cont’d…
System requirements
• More detailed specifications of user requirements
• Serve as a basis for designing the system
• May be used as part of the system contract
• System requirements may be expressed using system
models.
7
Cont’d…
9
Cont’d…
The process to gather the software requirements from client, analyse
and document them is known as requirement engineering.
• The goal of requirement engineering is to develop and maintain
refined and descriptive ‘System Requirements Specification’
document.
In practice, requirements engineering isn’t sequential process, it’s an
iterative process in which activities are interleaved.
– For example, you iterate first on the user requirements; elicitation,
specification, and validation, and repeat the same steps for the
system requirements.
• Each software development process goes through the phase of
requirements engineering
• The use of the term ‘engineering’ implies that systematic and
repeatable techniques should be used to ensure that system
requirements are complete, consistent, relevant, etc. 10
Cont’d…
11
Functional and Non-functional Requirements
12
Functional Requirements
• Functional requirements define what a system is supposed
to do.
• Functional requirements are usually in the form of
"system shall do <requirement>", an individual action or
part of the system.
• They define functions and functionality within and from
the software system.
• Functional requirement captures the behavioral aspects /
function of the proposed automated system.
• Functional requirements are the back bone of all software
products.
13
Cont’d…
17
Types of Non-Functional Requirements (NFRs)
Non-functional
requir ements
18
Product-oriented attributes
Performance : (a) response time, (b) throughput (number of operations
performed per second)
Usability: effort required to learn, use, provide input and interpret
results of a program
Efficiency: minimal use of resources (memory, processor, disk,
network…)
Reliability: of computations, precision
Security: resistance to unauthorized attempts
Robustness: in the presence of faults, stress, invalid inputs…
Adaptability: to other environments or problems
Scalability: for large number of users or quantities of data
Cost: total cost of ownership (TCO) for acquisition, installation.
– Portability: does it work for several platforms
– Modifiability: addition of new functionalities
– Reusability: of components, code, designs, and even requirements in
other systems 19
Process-oriented attributes
20
Performance Measures
• Lots of measures
– Response time, number of events processed/denied in
some interval of time, throughput, capacity, usage ratio,
loss of information, latency...
– Usually with probability and confidence interval.
21
Cont’d…
22
Reliability Measures
• Measure degree to which the system performs as required
– Includes resistance to failure
– Ability to perform a required function under stated conditions
for a specified period of time
– Very important for critical systems
• Can be measured using
– Probability that system will perform its required function for a
specified interval under stated conditions
– Mean-time to failure
– Defect rate
– Degree of precision for computations
23
Cont’d…
24
Availability Measures
– Definition: Percentage of time that the system is up and running
correctly
– Can be calculated based on Mean-Time Between Failure
(MTBF) and Mean-Time to Repair (MTTR)
• MTBF : Length of time between failures
• MTTR : Length of time needed to resume operation after a
failure
• Availability = MTBF/(MTBF+MTTR)
25
Cont’d…
• Examples
– The system shall meet or exceed 99.99% uptime.
– The system shall not be unavailable more than 1 hour per 1000
hours of operation.
– Less than 20 seconds shall be needed to restart the system after a
failure 95% of the time. (This is a MTTR requirement)
• Availability Downtime
– 90% 36.5 days/year
– 99% 3.65 days/year
– 99.9% 8.76 hours/year
– 99.99% 52 minutes/year
– 99.999% 5 minutes/year
– 99.9999% 31 seconds/year
26
Security Measures
• There are at least two measures:
– The ability to resist unauthorized attempts at usage
– Continue providing service to legitimate users while under
denial of service attack (resistance to DoS attacks)
• Measurement methods:
– Success rate in authentication
– Resistance to known attacks
– Time/efforts/resources needed to find a key
– Probability/time/resources to detect an attack
– Percentage of useful services still available during an attack
– Percentage of successful attacks
– Lifespan of a password, of a session
– Encryption level
27
Cont’d…
28
Usability Measures
• In general, concerns ease of use and of training end users.
The following more specific measures can be identified:
– Learnability
• Proportion of functionalities or tasks mastered after a given training time.
– Efficiency
• Acceptable response time
• Number of tasks performed or problems resolved in a given time
• Number of mouse clicks needed to get to information or functionality
– Memorability
• Number (or ratio) of learned tasks that can still be performed after not
using the system for a given time period
– Error avoidance
• Number of error per time period and user class
• Number of calls to user support
29
Cont’d…
• Error handling
– Mean time to recover from an error and be able to continue the
task
• User satisfaction
– Satisfaction ratio per user class
– Usage ratio
Examples
– Four out of five users shall be able to book a guest within 5
minutes after a 2-hour introduction to the system.
– Novice users shall perform tasks X and Y in 15 minutes.
– Experienced users shall perform tasks X and Y in 2 minutes.
– At least 80% of customers asked after a 3 months usage period
shall rate their satisfaction with the system at 7 and more on a
scale of 1 to 10.
30
Maintainability Measures
• Measures ability to make changes quickly and cost effectively
– Extension with new functionality
– Deleting unwanted capabilities
– Adaptation to new operating environments (portability)
– Restructuring (rationalizing, modularizing, optimizing, creating
reusable components)
• Can be measured in terms of
– Coupling/cohesion metrics, cyclomatic complexity(measure of
the number of linearly independent paths through a program's
source code)
– Mean time to fix a defect, mean time to add new functionality
– Quality/quantity of documentation
31
Cont’d…
• Measurement tools
– code analysis tools such as IBM Structural Analysis for Java
(http://www.alphaworks.ibm.com/tech/sa4j)
• Examples of requirements
– Every program module must be assessed for maintainability
according to procedure xx. 70% must obtain “highly
maintainable” and none “poor”.
– The cyclomatic complexity of code must not exceed 7.
– No method in any object may exceed 200 lines of code.
– Installation of a new version shall leave all database contents
and all personal settings unchanged.
– The product shall provide facilities for tracing any database field
to places where it is used.
32
Testability Measures
• Measures the ability to detect, isolate, and fix defects
– Time to run tests
– Time to setup testing environment (development and execution)
– Probability of visible failure in presence of a defect
– Test coverage (requirements coverage, code coverage…)
May lead to architectural requirements
– Mechanisms for monitoring
– Access points and additional control
• Examples
– The delivered system shall include unit tests that ensure 100%
branch coverage.
– Development must use regression tests allowing for full
retesting in 12 hours.
33
Portability Measures
• Measure ability of the system to run under different computing
environments
– Hardware, software, OS, languages, versions, combination of
these
• Can be measured as
– Number of targeted platforms (hardware, OS…)
– Proportion of platform specific components or functionality
– Mean time to port to a different platform
• Examples
– No more than 5% of the system implementation shall be specific
to the operating system.
– The meantime needed to replace the current Relational Database
System with another Relational Database System shall not exceed
2 hours.
– No data loss should arise. 34
Integrability and Reusability Measures
• Integrability
– Measures ability to make separated components work together
– Can be expressed as
• Mean time to integrate with a new interfacing system
• Reusability
– Measures ability that existing components can be reused in new
applications
– Can be expressed as
• Percentage of reused requirements, design elements, code,
tests…
• Coupling of components
• Degree of use of frameworks
35
Robustness Measures
• Measure ability to cope with the unexpected situations.
– Percentage of failures on invalid inputs
– Degree of service degradation
• Minimum performance under extreme loads
• Active services in presence of faults
• Length of time for which system is required to manage stress
conditions
• Examples
– The estimated loss of data in case of a disk crash shall be less
than 0.01%.
– The system shall be able to handle up to 10000 concurrent users
when satisfying all their requirements and up to 25000
concurrent users with browsing capabilities.
36
Domain-specific Measures
• The most appropriate quality measures may vary from one
application domain to another,
E.g.
• Performance
Web-based system:
• Number of requests processed per second
Video games:
• Number of 3D images per second
• Accessibility
– Web-based system:
• Compliance with standards for the blind
– Video games:
• Compliance with age/content ratings systems (e.g., no
violence) 37
Thank You!
?
38