Requirements Traceability & Use Cases

How can requirements be traced to use cases? This is a simple question, yet opens up the question of how requirements are expressed as use cases.

Requirements Statements

Requirements (or "high level requirements") are nothing more than a Christmas wish-list of user's wants. Here are some requirements for a website that will "display my digital photos on the web".

Requirements wish list : Display my photos on the web

In the professional world, most requirements are not as clearly stated as above. Requirements are often written as large paragraphs of text. Recommended is to take the written paragraphs underlining "requirements statements" and give each one a numerical identifier.

An example of requirements written in paragraph format

The website should order photos into galleries (R001). The visitor can review a thumbnail(R002) and request to see the full image (R003). The full image will have description such as camera used, f-stop, shutter speed, focal length and artistic comment.(R003) My bio and contact information is available(R005) as well as email(R004). I should be able to upload photos, thumbnails and descriptions easily(R006). The website should cost less than $50 to host(R007).

A list of requirements in table format is much easier to read that in paragraph format. If you're faced with requirements in paragraphs, put a table of requirement statements at the end of the document.

Use Case

Use case is a snapshot of a process or a sub-process.

Use Case : Upload Photos

I will use the following matrix to "trace" requirements statements to this use case.

Trace-ability Matrix : Requirement to Use Cases

The above trace-ability matrix tells me that the use case "Upload Photos" satisfies the requirement R006 (Easy to upload photos, create galleries and enter info about the photo).

Requirement id's can also be traced to use case steps:

Use Case : Upload Photos

The above example shows every step fulfilling the same requirement. Often one use case can fulfill several requirements.

We would then go on to create all the use cases for "display my photos on the web" and cross reference the use cases or use case steps to each requirement statement.

Sometimes a requirement does not have a corresponding use case. This is called a "non-functional requirement". Requirements that deal with the cost of a solution, or a technical requirement (must be web-hosted or must fulfill a technical standard) often do not find their way into use cases.

Tracing Requirements to Test Plans

Test Case 1 : Upload Photos