Requirements Engineering

A Comprehensive Guide to Software Requirements Development and Management

1 Introduction to Requirements Engineering

What is a Requirement?

A requirement is an expression of desired behavior that focuses on customer needs, not on the solution or implementation. Requirements designate what behavior is needed, without specifying how that behavior will be realized.

Requirements Engineering

The process of establishing the services that a customer requires from a system and the constraints under which it operates and is developed. The system requirements are the descriptions of the system services and constraints that are generated during the requirements engineering process.

Why Requirements Engineering Matters

Cost Impact

Fixing a requirements error after delivery may cost up to 100 times the cost of fixing an implementation error. Early validation is crucial.

Project Success

Clear, well-documented requirements are fundamental to project success and serve as the foundation for design and development.

Stakeholder Alignment

Requirements ensure all stakeholders have a shared understanding of what the system should do and how it should perform.

2 Types of Requirements

User vs System Requirements

User Requirements

Audience: Customers and end-users

Format: Natural language plus diagrams

Purpose: Describe the services the system provides and its operational constraints in terms understandable by non-technical stakeholders

System Requirements

Audience: Developers and technical team

Format: Structured document with detailed descriptions

Purpose: Define what should be implemented; may be part of a contract between client and contractor

Example: Mentcare System

User Requirement:

"The Mentcare system shall generate monthly management reports showing the cost of drugs prescribed by each clinic during that month."

System Requirements Specification:

  • 1.1: On the last working day of each month, a summary of the drugs prescribed, their cost and the prescribing clinics shall be generated.
  • 1.2: The system shall generate the report for printing after 17:30 on the last working day of the month.
  • 1.3: A report shall be created for each clinic and shall list the individual drug names, the total number of prescriptions, the number of doses prescribed and the total cost of the prescribed drugs.
  • 1.4: If drugs are available in different dose units (e.g. 10mg, 20mg, etc) separate reports shall be created for each dose unit.
  • 1.5: Access to drug cost reports shall be restricted to authorized users as listed on a management access control list.

Functional Requirements

Core System Behavior

Functional Requirements are statements of services the system should provide, how the system should react to particular inputs, and how the system should behave in particular situations. They may also state what the system should not do.

Characteristics

  • Describe functionality or system services
  • Depend on software type, expected users, and system context
  • User requirements: high-level statements in natural language
  • System requirements: detailed descriptions with inputs, outputs, and exceptions

Examples: Mentcare System

  1. A user shall be able to search the appointments lists for all clinics.
  2. The system shall generate each day, for each clinic, a list of patients who are expected to attend appointments that day.
  3. Each staff member using the system shall be uniquely identified by his or her 8-digit employee number.

Non-Functional Requirements

Quality Attributes & Constraints

Non-Functional Requirements define system properties and constraints such as reliability, response time, and storage requirements. They may be more critical than functional requirements—if not met, the system may be useless.

Category Description Examples
Product Requirements Specify or constrain the runtime behavior of the software Execution speed, reliability, security, usability
Organizational Requirements Consequence of organizational policies and procedures Development process requirements, programming languages, operational standards
External Requirements Arise from factors external to the system and its development Regulatory requirements, legislative requirements, ethical requirements

Examples: Mentcare System

Product Requirement:

"The Mentcare system shall be available to all clinics during normal working hours (Mon–Fri, 08:30–17:30). Downtime within normal working hours shall not exceed five seconds in any one day."

Organizational Requirement:

"Users of the Mentcare system shall authenticate themselves using their health authority identity card."

External Requirement:

"The system shall implement patient privacy provisions as set out in HStan-03-2006-priv."

Domain Requirements

Domain-Specific Constraints

Domain Requirements are constraints on the system from the domain of operation. They reflect the characteristics and constraints of the application domain.

3 System Stakeholders

What is a Stakeholder?

Any person or organization who is affected by the system in some way and who has a legitimate interest in it.

Types of Stakeholders

👥 End Users

People who will directly interact with and use the system

👔 System Managers

Those responsible for managing the system's operation

💼 System Owners

Organizations or individuals who own and fund the system

🌍 External Stakeholders

Regulatory bodies, partners, and other affected parties

Example: Stakeholders in the Mentcare System

  • Patients: Whose information is recorded in the system
  • Doctors: Responsible for assessing and treating patients
  • Nurses: Coordinate consultations with doctors and administer treatments
  • Medical Receptionists: Manage patients' appointments
  • IT Staff: Install and maintain the system
  • Medical Ethics Manager: Ensures the system meets ethical guidelines for patient care
  • Healthcare Managers: Obtain management information from the system
  • Medical Records Staff: Maintain and preserve system information

4 Requirements Engineering Processes

Important Note

The processes used for requirements engineering vary widely depending on the application domain, the people involved, and the organization. However, there are generic activities common to all processes. In practice, RE is an iterative activity in which these processes are interleaved.

Core RE Activities

Requirements Elicitation

Working with stakeholders to discover and understand their requirements. This involves gathering information about the application domain, work activities, desired services and features, performance requirements, and hardware constraints.

Requirements Analysis

Examining, classifying, and organizing requirements. This includes grouping related requirements into coherent clusters, prioritizing requirements, and resolving conflicts between different stakeholder needs.

Requirements Validation

Checking that the requirements actually define the system that the customer really wants. This involves demonstrating validity, consistency, completeness, and realism of requirements.

Requirements Management

Managing changing requirements during the RE process and system development. This includes tracking individual requirements and maintaining links between dependent requirements to assess the impact of changes.

5 Requirements Elicitation

Requirements Elicitation (Discovery)

The process of gathering information about the required and existing systems and distilling the user and system requirements from this information. Involves interaction with system stakeholders from managers to external regulators.

Elicitation Process Activities

Requirements Discovery

Interacting with stakeholders to discover their requirements. Domain requirements are also discovered at this stage.

Classification & Organization

Grouping related requirements and organizing them into coherent clusters.

Prioritization & Negotiation

Prioritizing requirements and resolving requirements conflicts between stakeholders.

Documentation

Requirements are documented and prepared as input for the next phase of development.

Elicitation Techniques

Interviewing

Talking to people about what they do. This is the most common elicitation technique where requirements engineers conduct structured or unstructured interviews with stakeholders to understand their needs, workflows, and expectations.

Best for: Understanding individual perspectives, exploring specific concerns, and gathering detailed information about work processes.

Observation / Ethnography

Watching people doing their job to see what artifacts they use, how they use them, and understanding the context of their work. This technique helps uncover implicit requirements that stakeholders might not articulate in interviews.

Best for: Understanding actual work practices, identifying unstated requirements, and recognizing the social and organizational context of system use.

Stories and Scenarios

Real-life examples of how a system can be used. Stories and scenarios describe how a system may be used for particular tasks. Because they're based on practical situations, stakeholders can relate to them and provide meaningful feedback.

Best for: Making requirements concrete, facilitating discussion with stakeholders, and ensuring shared understanding of system use cases.

Problems in Requirements Elicitation

  • Unrealistic demands: Stakeholders may not know what is feasible
  • Communication barriers: Stakeholders express requirements in domain-specific terms not understood by engineers
  • Conflicting requirements: Different stakeholders have diverse, sometimes contradictory needs
  • Political influences: Managers may demand specific requirements to increase organizational influence
  • Changing requirements: Requirements evolve during analysis as new stakeholders emerge and the business environment changes

User Stories and Scenarios

User Story Example: Photo Sharing in the Classroom (iLearn)

Context: Salah is a primary school teacher planning a class project about the fishing industry.

Story:

"Pupils should gather and share old memories from relatives, use newspaper archives and collect old photographs related to fishing and fishing communities in the area. Pupils use a wiki to gather fishing stories and use SCRAN (a history resources site) to access newspaper archives and photographs. I also need a photo sharing site as I want pupils to take and comment on each others' photos and to upload scans of old photographs that they may have in their families."

Scenario Example: Uploading Photos (iLearn)

Initial Assumption:

A user or group of users have one or more digital photographs saved on a tablet or laptop computer. They have successfully logged on to the system.

Normal Flow:

The user chooses "upload photos" and is prompted to select photos from their computer and the project name. Users can input keywords for each photo. Uploaded photos are named by combining username with the filename. On completion, the system sends an email to the project moderator and displays a confirmation message to the user.

What Can Go Wrong:
  • No moderator: Email sent to administrator; user informed of possible delay
  • Duplicate names: User asked to re-upload, rename, or cancel; options provided for each choice
Other Activities:

The moderator may be logged on and may approve photos as they are uploaded.

System State on Completion:

User is logged on. Selected photos have been uploaded and assigned status "awaiting moderation". Photos are visible to the moderator and the uploading user.

Structured Scenarios Should Include:

  • A description of the starting situation
  • A description of the normal flow of events
  • A description of what can go wrong
  • Information about other concurrent activities
  • A description of the state when the scenario finishes

6 Requirements Specification

Requirements Specification

The process of writing down the user and system requirements in a requirements document. User requirements must be understandable by end-users and customers without technical backgrounds. System requirements are more detailed and may include technical information. Requirements may be part of a contract for system development, so completeness is crucial.

Ways of Writing System Requirements

Notation Description Best Use Cases
Natural Language Requirements written using numbered sentences in natural language. Each sentence expresses one requirement. User requirements, general documentation
Structured Natural Language Requirements written on a standard form or template. Each field provides information about an aspect of the requirement. System requirements with consistent format
Design Description Languages Programming-like language with abstract features to specify requirements by defining an operational model. Interface specifications (rarely used now)
Graphical Notations Graphical models supplemented by text annotations (e.g., UML use case and sequence diagrams). Functional requirements visualization
Mathematical Specifications Based on mathematical concepts such as finite-state machines or sets. Unambiguous but may not be understood by customers. Critical systems requiring formal verification

Natural Language Specification

Why Natural Language?

Requirements are often written in natural language because it is expressive, intuitive, and universal. This ensures requirements can be understood by users and customers who may not have technical backgrounds.

Guidelines for Writing Requirements

  • Standard format: Invent and consistently use a standard format for all requirements
  • Consistent language: Use "shall" (يجب أن) for mandatory requirements, "should" (يفضل أن) for desirable requirements
  • Text highlighting: Use highlighting to identify key parts of requirements
  • Avoid jargon: Minimize use of computer jargon to maintain accessibility
  • Include rationale: Provide an explanation of why each requirement is necessary

Problems with Natural Language

  • Lack of clarity: Achieving precision without sacrificing readability is difficult
  • Requirements confusion: Functional and non-functional requirements tend to be mixed up
  • Requirements amalgamation: Several different requirements may be expressed together, making them hard to separate

Example: Insulin Pump Software System

Requirement 3.2:

"The system shall measure the blood sugar and deliver insulin, if required, every 10 minutes."

Rationale: Changes in blood sugar are relatively slow, so more frequent measurement is unnecessary; less frequent measurement could lead to unnecessarily high sugar levels.

Requirement 3.6:

"The system shall run a self-test routine every minute with the conditions to be tested and the associated actions defined in Table 1."

Rationale: A self-test routine can discover hardware and software problems and alert the user to the fact that normal operation may be impossible.

The Software Requirements Document

The software requirements document is the official statement of what is required of the system developers. It should include both a definition of user requirements and a specification of the system requirements.

Important: It is NOT a design document. As far as possible, it should set out WHAT the system should do rather than HOW it should do it.

Agile Methods and Requirements

Agile Perspective

Many agile methods argue that producing detailed system requirements is a waste of time because requirements change so quickly, making the requirements document always out of date.

Agile Approach: Use incremental requirements engineering and express requirements as "user stories"

When Agile Works / Doesn't Work

Practical for: Business systems with rapidly changing requirements

Problematic for:

  • Systems requiring pre-delivery analysis (e.g., critical systems)
  • Systems developed by several teams requiring coordination
  • Systems with regulatory or compliance requirements

7 Requirements Validation

Requirements Validation

Concerned with demonstrating that the requirements define the system that the customer really wants. Requirements error costs are high, so validation is very important—fixing a requirements error after delivery may cost up to 100 times the cost of fixing an implementation error.

Requirements Checking Criteria

Validity

Does the requirement really describe the functions which best support the customer's needs?

Comprehensibility

Is the requirement properly understood by all stakeholders?

Consistency

Are there any requirements conflicts or contradictions?

Completeness

Are all functions required by the customer included?

Realism

Can the requirements be implemented given available budget and technology?

Verifiability

Can the requirements be checked? Is the requirement realistically testable?

Traceability

Is the origin of the requirement clearly stated?

Adaptability

Can the requirement be changed without large impact on other requirements?

Requirements Validation Techniques

Requirements Reviews

Systematic manual analysis of requirements. Regular reviews should be held while requirements are being formulated. Both client and contractor staff should be involved. Reviews may be formal (with completed documents) or informal. Good communication between developers, customers, and users can resolve problems at an early stage.

Prototyping

Using an executable model of the system to check requirements. Prototypes help stakeholders visualize the system and identify missing or incorrect requirements early in the development process.

Test-Case Generation

Developing tests for requirements to check testability. If it's difficult to design tests for a requirement, the requirement may be incomplete or too vague and should be revised.

8 Requirements Management

Requirements Management

The process of managing changing requirements during the requirements engineering process and system development. New requirements emerge as a system is being developed and after it has gone into use.

Key Management Activities

Track Requirements

Keep track of individual requirements throughout the development lifecycle, maintaining clear identification and status information.

Maintain Links

Maintain links between dependent requirements to assess the impact of requirements changes across the system.

Formal Change Process

Establish a formal process for making change proposals and linking these to system requirements, ensuring controlled evolution.

Why Requirements Change

  • New stakeholders: Previously unconsidered stakeholders may emerge with new requirements
  • Business evolution: The economic or business environment changes
  • Technical advances: New technologies enable previously impossible features
  • Improved understanding: Better understanding of user needs emerges during development
  • Regulatory changes: New laws or regulations impose additional constraints

Key Points Summary

  • Requirements for a software system set out what the system should do and define constraints on its operation and implementation
  • Functional requirements are statements of services the system must provide or descriptions of how computations must be carried out
  • Non-functional requirements often constrain the system being developed and the development process being used, often relating to emergent properties
  • The requirements engineering process is an iterative process that includes requirements elicitation, specification, and validation
  • Requirements elicitation techniques include interviews, ethnography, user stories, and scenarios to facilitate stakeholder discussions
  • Requirements specification is the process of formally documenting user and system requirements in a software requirements document
  • The software requirements document should be organized so both system customers and software developers can use it effectively
  • Requirements validation checks requirements for validity, consistency, completeness, realism, and verifiability
  • Business, organizational, and technical changes inevitably lead to requirement changes that must be managed systematically
  • Requirements management is essential for controlling changes and maintaining system quality throughout development