Requirements engineering
Clear, exam-focused notes on Requirements Engineering: definitions, types, elicitation, SRS structure, validation, prioritisation, traceability, worked examples and common mistakes.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Requirements engineering is the activity of discovering, documenting and validating what a software system must do and the constraints on it. Engineers use it when planning projects (to create the SRS and project scope), during design (to decide architecture that satisfies requirements), and in testing and maintenance (to verify and trace features back to requirements).
Key ideas
Start from first principles: software is built to satisfy stakeholder needs. To build the right software, we must know those needs precisely.
- Stakeholder: any person, group or organisation that has an interest in or is affected by the system. (Define before other terms.)
- Requirement: a statement that a system must perform a function or satisfy a constraint. Exact definition: A requirement is a condition or capability needed by a stakeholder to solve a problem or achieve an objective, and that the system must meet. Assumption: the stakeholder need is stable for the scope under consideration.
- User requirement: high-level, natural-language statements and diagrams describing services and constraints for end users and customers.
- System requirement: a more detailed, structured specification of system functions, services and constraints that can be used to design the system.
- Functional requirement: a requirement that describes a service, task or function the system must perform (e.g., "The system shall allow users to login").
- Non-functional requirement (NFR): a requirement that constrains the system's operation or defines quality attributes (e.g., performance, security, usability). Also called quality attribute.
- Constraint: a restriction on a solution space (e.g., regulatory, hardware, programming language).
- Specification: a detailed, precise, testable description of a requirement in the SRS.
- Software Requirements Specification (SRS): a complete, unambiguous, verifiable document that records requirements and serves as the agreement between stakeholders and developers.
Properties (often called requirement quality attributes):
- Correctness: requirement reflects stakeholder intent.
- Completeness: all necessary requirements are present.
- Consistency: no two requirements conflict.
- Verifiability: requirement can be tested or checked.
- Traceability: the ability to link a requirement to its origin and to design, code and tests.
- Unambiguity: stated so that it has only one interpretation.
- Modifiability: structured and written to allow changes to be made easily and completely.
Exact statement universities expect: "A good requirement is unambiguous, complete, consistent, ranked for importance and testable." Assumptions: stakeholders can be identified and can articulate needs; resources allow verification.
Key activities in requirements engineering:
- Elicitation — gathering requirements from stakeholders (interviews, surveys, observation, workshops, prototyping, use cases). Define each technique before use.
- Analysis and modelling — structuring requirements, removing conflicts, creating use cases and UML models.
- Specification — writing the SRS with clear sections and acceptance criteria.
- Validation and verification — reviews, inspections, test-case derivation, prototyping to ensure requirements are correct and testable. Verification = building the product right; Validation = building the right product.
- Management and traceability — version control, change control, traceability matrices.
How to write a clear requirement (step-by-step derivation often asked in exams):
- Identify stakeholder and context.
- Write a short imperative statement starting with "The system shall ..." for functional, and a measurable sentence for NFR (e.g., "The system shall respond to a request within 2 seconds under X load"). Use "shall" for mandatory requirements, "should" for desirable goals (not mandatory), and "will" for statements about the environment or future events.
- Add acceptance criteria (what tests will show it is satisfied).
- Assign attributes: id, priority, source, owner, status, version.
Diagrams to draw and label (often required in exams):
- Use case diagram: draw an oval for each use case, stick-figure for each actor, and association lines between actor and use case. Label actors and use cases. Optionally show <<include>> or <<extend>> relationships as dashed arrows with label. In UML, <<include>> is a dashed arrow from the base use case to the included use case; <<extend>> is a dashed arrow from the extending use case to the base use case.
- Traceability matrix: draw a table with Requirement IDs as rows and Design Modules / Test Cases as columns; mark links with X or reference IDs.
Common standards and templates (state exact components expected): IEEE 830-1998 (withdrawn) defined a widely used SRS outline: 1) Introduction (purpose, scope, definitions, references, overview), 2) Overall description (product perspective, product functions, user characteristics, constraints, assumptions and dependencies), 3) Specific requirements (external interface requirements, system features/functional requirements, non-functional requirements, logical database requirements, design constraints), 4) Appendices, 5) Index. The current standard is ISO/IEC/IEEE 29148 (latest revision), which consolidates requirements engineering processes and SRS content; for exams, naming either is acceptable, but prefer ISO/IEC/IEEE 29148.
Requirement prioritisation methods: MoSCoW (Must, Should, Could, Won't), weighted scoring (assign weights and scores), and relative ranking. Define each before use.
Traceability: forward traceability links requirements to design and code; backward traceability links artifacts back to source requirements.
Conflict resolution: detect with consistency checks and resolve by negotiation, change of scope or duplication removal.
Version and change control: every requirement must have a unique id and change history; changes pass through impact analysis before approval.
Formulas
Score = (Σ (w_i × s_i)) / Σ w_i
- w_i = weight of criterion i (dimensionless), s_i = score for option on criterion i (dimensionless). Use when doing weighted scoring for prioritisation. If a criterion is “lower is better” on a 1..k scale, convert it with s'_i = (k + 1 - s_i) before applying the formula.
For requirement statements remember these syntax templates:
Functional: The system shall <action> <object> [condition]— use for functional requirements.NFR (measurable): The system shall <quality> <value> under <condition>— e.g., "The system shall respond within 2 seconds under 100 concurrent users." Units: seconds for time. Specify measurement point and statistic (e.g., 95th percentile end-to-end response time), workload profile, and test environment.- Use case template to remember:
Title,Primary actor,Preconditions,Postconditions,Main success scenario (steps),Extensions / Alternate flows,Special requirements.
Worked examples
Example 1 — From stakeholder statement to requirements (functional + NFR): Stakeholder statement: "Our customers must be able to place orders online and payments must be secure and fast." Steps:
- Identify stakeholders: Customer (primary), Payment Gateway (external system), Admin.
- Derive functional requirements:
- FR1: The system shall allow a customer to register with name, email and password. (Acceptance: registration creates account; test: create account with valid data.)
- FR2: The system shall allow a customer to place an order for items in the catalogue. (Acceptance: order saved, items reserved.)
- Derive NFRs:
- NFR1 (Security): The system shall use TLS 1.2 or higher for payment pages. (Acceptance: TLS enabled in environment; test: connection shows HTTPS and server supports TLS 1.2+.)
- NFR2 (Performance): The checkout page shall load within 2 seconds under 1000 concurrent users. (Acceptance: measured load test passes.) Final answer: present each requirement with id, text, priority, source and acceptance criteria.
Example 2 — Prioritisation using weighted scoring: We have features A,B,C,D. Criteria: Business Value (weight 5), Technical Risk (weight 3), Customer Demand (weight 2). Scores (1..5, higher better for value/demand, lower better for risk so invert risk):
- A: value 5, risk 2 (use 4 as inverted), demand 4
- B: value 4, risk 3 (use 3), demand 5
- C: value 3, risk 5 (use 1), demand 2
- D: value 2, risk 4 (use 2), demand 3 Calculate Score = (Σ w_i × s_i)/Σ w_i. Σ w_i = 5+3+2 = 10.
- A: (5×5 + 3×4 + 2×4)/10 = (25+12+8)/10 = 45/10 = 4.5
- B: (5×4 + 3×3 + 2×5)/10 = (20+9+10)/10 = 39/10 = 3.9
- C: (5×3 + 3×1 + 2×2)/10 = (15+3+4)/10 = 22/10 = 2.2
- D: (5×2 + 3×2 + 2×3)/10 = (10+6+6)/10 = 22/10 = 2.2 Rank: A, B, (C and D tied). Show steps and final bold scores.
Example 3 — Short use case trace (step-by-step): Title: Make Payment Primary actor: Customer Preconditions: Customer has an order with items and a valid payment method. Main success scenario:
- Customer selects "Pay" on checkout.
- System sends payment request to payment gateway.
- Payment gateway responds with success.
- System records payment and shows confirmation to customer. Postcondition: Order status = Paid. Write this as a numbered list with pre/post; this is enough for many exams.
Common mistakes
- Mixing design with requirements (e.g., "The system shall use Java and MySQL"). Only state constraints when they are true constraints.
- Non-measurable NFRs: "The system should be fast" — not measurable.
- No unique IDs or no traceability information in SRS.
- Forgetting to include acceptance criteria or testability statements.
- Drawing use case diagrams without labeling actors or use cases clearly.
For your exam
Question types:
- Definitions and short notes: define requirement, stakeholder, SRS, NFRs, MoSCoW. Full marks: give exact definition and a short example.
- Derivations / procedures: show steps to write a testable requirement or to perform prioritisation. Full marks: list steps in order and justify each.
- Numericals: weighted scoring or simple impact analysis. Full marks: show table, compute weighted sums and final ranking with units/dimensionless explained.
- Diagrams: draw and label a use case diagram or a traceability matrix. Full marks: correct symbols, actors labeled, and relationships shown.
- Long question: produce a short SRS fragment from stakeholder notes. Full marks: identify stakeholders, list FRs and NFRs with ids and acceptance criteria, and show traceability for one requirement.
Quick check
- What is a verifiable requirement? Give one example.
- Name two techniques used for requirement elicitation.
- In MoSCoW prioritisation, what does the "C" stand for? Answers: 1) A requirement is verifiable if there is a finite test or inspection that can show it is satisfied (example: "The system shall respond within 2 seconds to a search request under 100 users"). 2) Interviews and prototyping (also workshops, surveys, observation). 3) "Could" (Could be implemented if time allows).
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?