SE Notes
Documenting requirements in a formal SRS document.
The Software Requirement Specification (SRS) is the definitive document describing what a software system must do. It serves as the contract between stakeholders (who define what they need) and the development team (who builds it). A well-written SRS eliminates ambiguity, prevents scope creep, provides the basis for project estimation, guides system design, and defines the acceptance criteria against which the delivered system is judged. Without a clear SRS, teams build the wrong thing, stakeholders disagree about what was promised, and projects fail.
Purpose of the SRS
The SRS serves multiple audiences simultaneously: customers use it to verify their needs are captured; developers use it to understand what to build; testers use it to derive test cases; project managers use it for estimation and planning; and maintenance teams use it to understand the system's intended behavior when making future modifications.
IEEE 830 (now superseded by ISO/IEC/IEEE 29148) established the standard structure for SRS documents. While modern Agile teams may not produce traditional SRS documents, the principles of clear, complete, testable requirements remain essential regardless of format.
SRS Document Structure
1. Introduction
- Purpose: Why this SRS exists and who should read it
- Scope: System name, what it does and does not do, benefits and objectives
- Definitions and Acronyms: Domain-specific terms
- References: Related documents, standards, regulations
- Overview: How the rest of the document is organized
2. Overall Description
- Product Perspective: How the system fits within the larger ecosystem (interfaces with other systems, hardware constraints, operating environment)
- Product Functions: High-level summary of major functions
- User Characteristics: Who will use the system (technical level, domain expertise)
- Constraints: Regulatory, hardware, interface, and technology constraints
- Assumptions and Dependencies: Conditions assumed true that could affect requirements
3. Specific Requirements (the core of the SRS)
- Functional Requirements: Detailed description of every function the system performs
- Non-Functional Requirements: Performance, security, reliability, usability requirements
- Interface Requirements: User interfaces, hardware interfaces, software interfaces, communication interfaces
4. Appendices
- Data models, use case diagrams, prototypes, glossary
Writing Good Requirements
Each requirement must exhibit these qualities:
Correct: Accurately represents a stakeholder need. Unambiguous: Has only one possible interpretation. Complete: Contains all information needed for implementation. Consistent: Does not contradict other requirements. Verifiable/Testable: Can be verified through testing, inspection, or demonstration. Traceable: Has a unique identifier and traceable origin. Modifiable: Can be changed without excessive impact. Ranked: Has priority (essential, desirable, optional).
Poor requirement: "The system should be responsive." Good requirement: "REQ-PERF-001: The system shall return search results within 2 seconds for queries against a database containing up to 5 million records, with up to 500 concurrent users."
Real-World Example: Library Management SRS (Excerpt)
| REQ-F-001 | The system shall allow users to search the catalog by title, |
| REQ-F-002 | Search results shall display book title, author, availability |
| REQ-F-003 | The system shall support partial matching (searching "soft" |
| REQ-F-010 | The system shall allow registered members to borrow up to 5 |
| REQ-F-011 | The system shall prevent borrowing if the member has overdue |
| REQ-F-012 | The system shall set a return due date of 14 days from |
| REQ-F-013 | The system shall send email reminder 3 days before due date. |
| REQ-NF-001 | The system shall support 200 concurrent users without |
| REQ-NF-002 | Page load time shall not exceed 3 seconds on a standard |
| REQ-NF-010 | User passwords shall be stored using bcrypt with minimum |
| REQ-NF-011 | Sessions shall timeout after 30 minutes of inactivity. |
| REQ-NF-020 | The system shall maintain 99.5% uptime during library |
SRS in Agile Development
While Agile teams typically do not produce monolithic SRS documents, they still specify requirements—just in different formats: user stories with acceptance criteria, product backlogs with definition of done, and living documentation maintained alongside the code. The principles remain: requirements must be clear, testable, and provide sufficient guidance for implementation and verification.
Common SRS Mistakes
Ambiguous language: Words like "should," "may," "adequate," and "user-friendly" are subjective and untestable. Use "shall" for mandatory requirements with specific, measurable criteria.
Implementation bias: "The system shall use a PostgreSQL database" is a design decision, not a requirement. The actual requirement might be "The system shall store data reliably with point-in-time recovery capability."
Missing non-functional requirements: Teams often document what the system does but not how well it must do it. Performance, security, scalability, and availability requirements are frequently overlooked.
Scope creep through ambiguity: Vague requirements expand during implementation. "The system shall generate reports" could mean 5 reports or 500—specify exactly which reports with which content.
Requirements Management
The SRS is not static—it evolves as understanding deepens and business needs change. Requirements management includes version control (tracking changes to requirements), change control (formal process for approving requirement changes), traceability (maintaining links between requirements, design, code, and tests), and impact analysis (assessing the effect of proposed changes on schedule, budget, and other requirements).
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Software Requirement Specification (SRS).
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Software Engineering topic.
Search Terms
software-engineering, software engineering, software, engineering, requirements, requirement, specification, srs
Related Software Engineering Topics