Sub topic 8
Writing Functional Requirements
Assume you understand the basic roles of product managers, designers, and engineers, and that you know what a product feature is. This chapter focuses on turning a user need into a clear description of what the product must do.
What a functional requirement is
A functional requirement describes a behavior the product must provide. It answers questions such as:
- What can a user do?
- What information does the system accept?
- What result does the system produce?
- What happens when an action fails?
- Who is allowed to perform the action?
A functional requirement should describe observable behavior. It should not prescribe an implementation unless the implementation is itself a constraint.
Weak requirement:
> The export should be easy to use.
Stronger requirement:
> A team admin can download the member list as a CSV file from the member-list page.
The stronger version names the user, action, location, and result. Another person can test whether it is true.
Derive requirements from user stories
Start with a user story and split it into smaller behaviors. For example:
> As a team admin, I want to export the member list as a CSV file so that I can share it with finance.
This story implies several functional requirements:
- The product identifies whether the current user is a team admin.
- The product displays an Export action to an authorized admin.
- The product creates a CSV file from the member list.
- The file contains one row per member.
- The product prevents unauthorized users from exporting the list.
- The product reports an error if the export cannot be created.
The user story explains the user value. The functional requirements describe the behavior needed to deliver that value.
flowchart TD
A[User need] --> B[User story]
B --> C[Functional behavior]
C --> D[Acceptance criteria]
D --> E[Test result]caption: From a user need to a testable functional requirement alt: A flowchart showing a user need becoming a user story, functional behavior, acceptance criteria, and a test result.
Make requirements testable
A requirement is testable when someone can determine whether the product passes or fails it. Use specific conditions and outcomes. Avoid words such as “quickly,” “normally,” “simple,” and “appropriate” unless you define them.
| ID | Requirement | Priority | Acceptance criteria |
|---|---|---|---|
| FR-1 | The system must let a team admin export the member list as CSV. | Must | Given an admin chooses Export, a CSV download starts. |
| FR-2 | The CSV must contain name, email, and role columns. | Must | The first row contains exactly these required column names. |
| FR-3 | The system must hide Export from non-admin users. | Must | A non-admin does not see the Export action. |
| FR-4 | The admin could choose optional columns. | Could | The admin can select optional columns before downloading. |
Keep one behavior in each requirement. This makes failures easier to locate and prevents a vague sentence from hiding several incomplete features.
Separate behavior from quality constraints
Functional requirements describe what the product does. Non-functional requirements describe qualities or constraints on that behavior, such as speed, availability, security, or accessibility.
For example:
- Functional: The system generates a CSV containing every current member.
- Non-functional: The export completes within five seconds for lists of up to 10,000 members.
- Functional: Only team admins can download the file.
- Non-functional: Export requests are recorded in the audit log.
Both types belong in the PRD, but labeling them separately helps the team plan and test them correctly.
def export_columns(required_columns, selected_columns):
"""Return the columns that an export is allowed to contain."""
columns = list(dict.fromkeys(required_columns + selected_columns))
assert set(required_columns).issubset(columns)
return columns
assert export_columns(["name", "email", "role"], ["department"]) == [
"name", "email", "role", "department"
]Exercise
Exercise
Rewrite this requirement so it is specific and testable: “Users should be able to search for members easily.”
Show answer
“Given a signed-in user enters a member’s name in the search field, when the user submits the search, then the member list shows matching members or a message stating that no members match.”