Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 50 ยท Requirements Engineering

The Software Requirements Specification

Learn what a Software Requirements Specification contains, how traceability links requirements to tests, how MoSCoW sets priorities and how change control works.

After requirements are gathered (gathering), sorted into kinds (functional and non-functional) and written as stories or use cases (stories and use cases), they need a home. In many projects that home is a Software Requirements Specification, or SRS: a document (or a structured set of pages in a tool) that states what the system shall do and the qualities it must have, agreed by customers and the development team.

An SRS serves several readers at once. Customers use it to check that their needs were understood, designers use it to decide what to build, testers use it to derive test cases, and project managers use it for scope and estimates. It is also the baseline against which later change requests are judged. Agile teams may keep a lighter form (a product backlog plus acceptance criteria), but the questions an SRS answers are needed in every approach. Examples here are JavaScript stand-ins that organize requirement data; the document itself is plain writing.

A typical structure

There are many templates (the best known comes from an IEEE standard that has been revised several times). Most share this outline:

  1. Introduction: purpose, scope (what is in and out), definitions and abbreviations, references, and an overview of the document.
  2. Overall description: the product's context (is it standalone or part of a larger system?), main functions in summary, user classes and characteristics, operating environment, design and implementation constraints, and assumptions and dependencies.
  3. Specific requirements:
    • External interfaces: user interface, hardware, software and communication interfaces.
    • Functional requirements: organized by feature, use case or user class.
    • Non-functional requirements: performance, security, reliability, usability and so on, each with a measure.
    • Other requirements: legal, regulatory, data and localization needs.
  4. Appendices: data models, sample reports, a glossary, and an index.

What an SRS holds

Scope What is in and what is out.
Users Who uses it and how.
Functions What the system shall do.
Qualities Measurable limits and goals.

Each requirement has an ID so it can be traced.

1 / 2

Qualities of a good SRS

A good SRS is correct, unambiguous, complete, consistent, ranked for importance, verifiable, modifiable and traceable. Completeness does not mean exhaustive; it means that nothing needed to build and test the system is left unsaid. Be wary of a 300-page document that nobody reads: size is not quality. Write every requirement as a single, numbered statement:

TEXT
FR-12  The system shall refuse a withdrawal that exceeds the available balance
       and display the available balance.
       Source: Use case UC-3, step 4a.   Priority: Must.   Verification: Test.
NFR-4  95% of balance enquiries shall complete within 2 seconds under a load
       of 500 concurrent users.   Priority: Should.   Verification: Load test.

Notice the ID, the source (where the requirement came from), the priority and the verification method (test, demonstration, inspection or analysis). The attributes are as important as the sentence.

Traceability

Traceability means being able to follow a requirement forwards and backwards through the project's artifacts:

  • Backward to its origin: which stakeholder, use case or regulation asked for it?
  • Forward to its design elements, code, and tests: where is it implemented, and which tests prove it?

A requirements traceability matrix records these links, usually as a table with requirements as rows and tests (or design items) as columns. Its value is practical:

  • It finds gaps: a requirement with no test is unverified; a test with no requirement may be testing something nobody asked for.
  • It supports impact analysis: when a requirement changes, the matrix lists the tests and components affected.
  • It provides evidence for audits in regulated fields.

Traceability costs effort to maintain, so tools help, and teams trace at the granularity that gives them value, not every line of code.

Prioritization with MoSCoW

You can rarely build everything. Prioritization decides what to do first and what to drop when time runs out. MoSCoW is a simple scheme with four labels:

Label Meaning Rule of thumb
Must have The release is a failure without it Legal duties, core function
Should have Important, but a workaround exists Painful to omit, not fatal
Could have Nice to have if time allows First to be cut
Won't have (this time) Agreed to be out of scope for now Recorded so it is not forgotten

Teams commonly cap "Must" items at about 60% of the available effort, so that "Should" and "Could" items give slack when estimates are wrong. Other methods include scoring by value and cost, the Kano model (which separates basic expectations from delighters), and ranking a backlog by value per unit of effort. Whatever the method, the customer or product owner decides priority; developers contribute cost and risk information.

Change control

Requirements change: the market moves, laws change, users learn. The danger is uncontrolled change ("scope creep"), where small additions pile up without anyone updating the budget or schedule. A change control process keeps change visible:

  1. Submit a change request: what, why, who asked.
  2. Analyze impact with the traceability matrix: affected requirements, design, tests, cost and schedule.
  3. Decide (often a small change control board, or in agile teams the product owner): accept, reject or defer.
  4. Update the SRS, plans and tests, and record the new version.
  5. Communicate to everyone affected.

The SRS is baselined (frozen as an agreed version) and changes produce new versions with a history, as described in configuration and change management. Agile teams express the same idea by reordering the backlog each iteration: changing priorities is normal, but each change is a visible, owned decision.

Stand-in 1: build a traceability matrix

The stand-in below holds an invented list of requirements and tests, with each test pointing at the requirements it verifies. It builds the matrix and reports requirements without tests and tests without requirements, which are the two classic gaps.

JS Traceability matrix builder

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Two requirements have no test (an unverified "Could" and an unverified "Should" quality). A real team would look at priority first: an uncovered Must is an alarm, an uncovered Could is a conscious risk. The orphan test might be testing an unwritten requirement, which means the SRS is incomplete, or it might be waste.

Stand-in 2: MoSCoW budget and change impact

The second stand-in plans a release with a capacity of 20 person-days. It checks the "Must" share against the 60% rule of thumb and then evaluates a change request by finding the requirements affected through the traceability links. All numbers are invented.

JS MoSCoW plan and change impact

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The plan uses 16 of 20 days, so it fits; the Must items take 9 days, which is 45% of capacity, inside the guideline and leaving slack. A change to FR-1 ripples to everything that depends on it, while a change to FR-3 affects only FR-3 and FR-4. This is impact analysis in miniature: the cost of a change depends on how connected the requirement is.

Keeping an SRS alive

An SRS that is written once and then ignored becomes fiction. Keep it useful by storing it in version control or a requirements tool, giving every requirement a stable ID (never reuse an ID), reviewing it with stakeholders in short inspections, and updating it in the same change as the code and tests it affects. Aim for the smallest document that removes ambiguity. The next chapter turns to modeling with UML, which gives requirements a visual form.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What is a requirements traceability matrix mainly used for?

    The matrix shows which requirements have tests, which tests have no requirement, and what a change affects.
  2. 2. In MoSCoW, what does the 'W' stand for?

    'Won't have this time' records items agreed to be out of scope for now, so they are not forgotten or smuggled in.
  3. 3. Why cap Must items at about 60% of capacity?

    If Musts fill all the capacity, any estimate error means a failed release. Should and Could items act as a buffer.
  4. 4. A requirement with no test in the traceability matrix means:

    An untested requirement cannot be shown to be met. An uncovered Must is serious; an uncovered Could may be an accepted risk.
  5. 5. What is the purpose of change control?

    Change is normal. Control prevents unmanaged scope creep by tying each change to impact analysis and a decision.

Summary

  • An SRS states scope, overall description, specific functional and non-functional requirements and constraints; each requirement has an ID, source, priority and verification method.
  • Good requirements are correct, unambiguous, complete, consistent, verifiable and traceable; shorter and clearer beats longer.
  • Traceability links requirements to origins and tests, exposing gaps and supporting impact analysis.
  • MoSCoW sorts requirements into Must, Should, Could and Won't; keep Musts to a share of capacity that leaves slack.
  • Change control submits, analyzes, decides, updates and communicates every change to a baselined SRS.

Next: UML Overview.