Software Requirements Engineering Principles and Practices

Software Requirements and Their Types

Software requirements are statements that describe what a system should do and how it should behave. They act as a foundation for designing, developing, and testing software.

Functional Requirements (FR)

Functional requirements define what the system must do by describing specific functions or tasks.

  • Examples:
    • “The system shall allow users to log in using a username and password.”
    • “The system shall generate monthly sales reports.”

Non-Functional Requirements (NFR)

Non-functional requirements define how the system should perform, focusing on quality attributes.

  • Examples:
    • “The system should respond within 2 seconds.”
    • “The system should handle 1,000 users simultaneously.”

Key Differences Between FR and NFR

  • Functional Requirements: Describe system functions, focus on tasks, are easy to test (e.g., a login feature).
  • Non-Functional Requirements: Describe system quality, focus on performance, security, and usability, and are harder to test (e.g., login must occur in less than 2 seconds).

Importance of Requirements Engineering

Requirements Engineering (RE) is vital because it ensures the developed software matches the user’s real needs. Its importance includes:

  • Clear understanding of needs: Helps developers and customers agree on what to build.
  • Reduces rework: Good requirements prevent costly changes during later stages.
  • Improves quality: Well-defined requirements lead to better design and fewer bugs.
  • Time and cost savings: Correct requirements help plan budget, effort, and schedule.
  • Better communication: Creates a common document for customers, developers, and testers.

Thus, requirements engineering ensures software is useful, correct, and successful.

Characteristics of a Good SRS

A high-quality Software Requirement Specification (SRS) should be:

  • Correct: All requirements must be accurate and approved by users.
  • Complete: Includes all necessary functional and non-functional requirements.
  • Unambiguous: Requirements must be clear with only one possible meaning.
  • Verifiable: Each requirement should be testable.
  • Consistent: No conflicts between different requirements.
  • Modifiable: Easy to update or change when needed.
  • Traceable: Every requirement can be tracked through design, code, and testing.

Feasibility Study in Software Development

A feasibility study checks whether a proposed software project is practical and possible to develop, determining if the project should proceed.

Types of Feasibility

  • Technical Feasibility: Checks if the required technology, tools, and skills are available.
  • Economic Feasibility: Evaluates cost versus benefit to ensure financial worthiness.
  • Operational Feasibility: Checks if the system will work smoothly in a real environment and be accepted by users.
  • Legal Feasibility: Ensures the project follows laws, regulations, and policies.
  • Schedule Feasibility: Checks if the system can be completed within the deadline.

Why Feasibility Analysis Matters

  • Avoids risk: Identifies technical, financial, and operational risks early.
  • Saves cost and time: Prevents investment in projects that may fail later.
  • Guides planning: Helps prepare realistic budgets, timelines, and resources.
  • Ensures practicality: Confirms that the project can actually be built.
  • Supports decision-making: Management uses results to approve or reject a project.

Requirements Elicitation Techniques

Requirements elicitation is the process of collecting and discovering requirements from users, stakeholders, and documents.

Four Common Elicitation Techniques

  • Interviews: One-to-one or group discussions with stakeholders to gather detailed requirements.
  • Questionnaires/Surveys: Sets of questions given to many users to collect information quickly.
  • Observation: Analysts observe how users currently perform tasks to understand real needs.
  • Document Analysis: Studying existing manuals, reports, and system documents to find requirements.

Note: Other techniques include workshops, brainstorming, and prototyping.

Problems Faced During Elicitation

  • Unclear or vague requirements: Users may not know exactly what they want.
  • Communication gap: Misunderstandings between users and analysts.
  • Changing requirements: Needs change due to new ideas or market conditions.
  • Conflicting requirements: Different stakeholders may want different features.
  • Time constraints: Limited time to meet and collect details.
  • Lack of domain knowledge: Analysts may not understand the business properly.

Requirement Analysis and Conflict Resolution

Steps Involved in Requirement Analysis

  1. Requirement gathering: Collect functional and non-functional requirements.
  2. Classification: Group requirements into categories (FR, NFR, constraints).
  3. Analysis: Check for feasibility, completeness, and consistency.
  4. Prioritization: Decide which requirements are most important.
  5. Modeling: Represent requirements using diagrams (DFD, ERD, UML).
  6. Validation: Ensure requirements are correct and acceptable.

Elicitation vs. Requirement Analysis

  • Requirement Elicitation: The process of collecting requirements; focuses on understanding needs; uses interviews and surveys; the first activity.
  • Requirement Analysis: The process of studying and refining requirements; focuses on checking quality; uses modeling and validation; occurs after elicitation.

Resolving Requirement Conflicts

A requirement conflict occurs when requirements contradict each other or stakeholders demand different things. Resolution methods include:

  • Discussion and negotiation: Stakeholders meet to reach a compromise.
  • Prioritization: Selecting the most important requirement based on project goals.
  • Prototyping: Showing a sample design to clarify confusion.
  • Decision by management: The final decision is taken by the project leader or client.

Analysis Patterns and Reusable Solutions

Analysis patterns are reusable solutions for common problems found during requirement analysis.

Benefits and Examples

  • Benefits: Saves time, improves quality, increases consistency, and aids understanding.
  • Examples: Account Transaction Pattern (banking) and Reservation Pattern (booking systems).

How Patterns Support Analysis

  • Provide reusable models: Analysts use existing solutions instead of starting from scratch.
  • Reduce complexity: Patterns break big problems into simpler structures.
  • Improve communication: Stakeholders easily understand patterns through diagrams.
  • Ensure completeness: Patterns include common requirements that might otherwise be missed.
  • Speed up analysis: Faster documentation and modeling.

Software Requirement Specification (SRS) Components

The SRS is a detailed document describing all requirements of the software system. Its components include:

  • Introduction: Purpose, scope, and definitions.
  • Overall Description: Product perspective, functions, constraints, and assumptions.
  • Functional Requirements: Detailed list of system functions.
  • Non-Functional Requirements: Performance, security, usability, and reliability.
  • System Models: DFD and UML diagrams.
  • Interface Requirements: User, hardware, and software interfaces.

Requirement Analysis vs. Specification

  • Requirement Analysis: Studying, refining, and structuring requirements; focuses on understanding; uses modeling; results in clear requirements.
  • Requirement Specification: Writing requirements in a formal document (SRS); focuses on documentation; produces the final SRS report.

Validation and Management

Requirement Validation Techniques

Validation ensures requirements are correct, complete, and meet user needs through:

  • Reviews: Teams check requirements for errors and missing details.
  • Prototyping: A small working model is shown to users for feedback.
  • Walkthroughs: Analysts explain requirements step-by-step to a review team.
  • Testing: Requirements are checked for testability.

Requirement Management Activities

Requirement management is the process of organizing and tracking requirements throughout the project:

  • Documenting requirements: Writing and storing all requirements properly.
  • Version control: Maintaining different versions when updates occur.
  • Change management: Handling requirement changes in a controlled way.
  • Traceability: Linking requirements to design, code, and testing.
  • Monitoring: Tracking requirement status during development.

Requirement Traceability Matrix (RTM)

The RTM is a document that maps each requirement to its design, implementation, and testing stages. It is important because it ensures all requirements are implemented, helps track changes, supports testing coverage, and reduces missing requirements.

Tools for Requirement Engineering

Four Essential Tools and Their Features

  • Jama Software: Requirement tracking, impact analysis, and collaboration.
  • IBM DOORS: Powerful traceability, change management, and large-scale support.
  • JIRA: Requirement mapping, issue tracking, and workflow management.
  • Rational RequisitePro: Requirement linking, document management, and change control.

Support from Automated and CASE Tools

Automated tools support management through automatic version control, traceability, visualization, change tracking, and collaboration. CASE (Computer-Aided Software Engineering) tools specifically support modeling (DFD, UML), documentation, traceability, error checking, and improved productivity.