tracing requirements 1. the role of traceability in systems development experience has shown that...

18
Tracing Requirements 1

Upload: cecil-wilkins

Post on 23-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Requirements

1

Page 2: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

The Role of Traceability in Systems Development Experience has shown that the ability to

trace requirements artifacts through the stages of specification, architecture, design, implementation, and testing is a significant factor in assuring a quality product.

Software developed in many areas for certain customers may have mandated traceability requirements (e.g. the FDA).

2

Page 3: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Definition of Traceability

According to IEEE [1994] traceability is: “The degree to which a relationship can be

established between two or more products of the development process, especially products having a predecessor-successor or master-subordinate relationship to one another; for example the degree to which the requirements and design of a given software component match.”

“The degree to which each element in a software development product establishes its reason for existing; for example, the degree to which each element in a bubble chart references the requirement it satisfies.”

3

Page 4: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

The Traceability Relationship

A traceability relationship is a dependency relationship between two project elements.

A

B

traces

Element B is in some wayDependent on element A

4

Page 5: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

The Traceability Relationship (Cont’d)

A dependency relationship states that a change in one element (e.g., a use case) may affect another element (e.g., a test case), but the reverse is not necessarily true.

Additional meanings associated with the traces (or traced by) relationship can be inferred from the context. E.g., in the previous example, the relationship infers that the use case is “tested by” the test case.

5

Page 6: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

A Generalized Traceability Model

Stakeholder Need

Product Feature

SupplementaryRequirements

Use Case

Test Cases Test Cases

Use-CaseRealization

Implementation

SystemDefinition

System Test

traces

traces traces

traces traces

traces

6

Page 7: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Requirements in the System Definition Domain

This is called requirement-to-requirement traceability.

It includes: Tracing user needs to features Tracing features to use cases Tracing features to supplementary

requirements

7

Page 8: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing User Needs to Features

Traceability Matrix: User Needs versus Features

Feature 1 Feature 2 . . . Feature n

Need 1 X

Need 2 X X

… X X

Need m X

8

Page 9: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Examining the Traceability Matrix for Possible Errors If inspection of a row fails to detect any Xs, a

possibility exists that no feature is yet defined to respond to a user need. This might be acceptable, but it raises a red flag.

If inspection of a column fails to detect any Xs, possibility exists that a feature has been included for which there is no defined product need.

The traceability matrix can be helpful when changes in user needs occur.

9

Page 10: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Features to Use Cases

It is important to ensure that the features can be related to the use cases proposed for the system.

A matrix similar to the Needs versus Features matrix can be used.

10

Page 11: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing User Needs to Features

Traceability Matrix: Features versus Use Cases

Use Case 1 Use Case 2 . . . Use Case k

Feature 1 X X

Feature 2 X X

… X

Feature n X X

11

Page 12: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Examining the Traceability Matrix for Errors

If inspection of a row fails to detect any Xs, a possibility exists that no use case is yet defined to respond to a feature. This is a red flag.

If inspection of a column fails to detect any Xs, a possibility exists that a use case has been included for which there is no known feature that requires it. That is, this use case may not be required.

12

Page 13: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Features to Supplementary RequirementsTraceability Matrix: Features versus Supplementary Requirements

Supplementary Requirement 1

Supplementary Requirement 2

. . . Supplementary Requirement p

Feature or Sys Req 1

X X

Feature or Sys Req 2

X X

… X X

Feature or Sys Req j

X

13

Page 14: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Requirements to Implementation First we trace use cases to use case

realizations as we did before. We then follow the traceability relationship to

the component parts of the use case realization, the classes (code).

We must do something similar for supplementary requirements. In this case we trace the requirements to a collaboration (which we need to name since it doesn’t come from a use case). See next slide.

14

Page 15: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing Supplementary Requirements to Implementation

Sync Clock<<trace>>

Requirements

- The clocks shall . . .

- Every 24 hours . . .

- Synchronization occurs . . .

Design Model

Collaboration

Participating classes

15

Page 16: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Tracing from Requirements to Testing A comprehensive approach to testing is to

assure that every use case is tested by one or more test cases.

In fact, each possible scenario for a use case needs to be tested by one or more test cases.

We can create a traceability matrix that maps use cases to test cases.

Requirements that are not expressed as use cases are either traced individually to scenarios and test cases or grouped into “requirements packages” that operate in the same logical fashion as use cases.

16

Page 17: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Traceability Matrix for Use Cases to Test Cases

Use Case Scenario Number Test Case ID

Control Light 1 1.1

2 2.1

3 3.1

4 4.1

4 4.2

4 4.3

5 5.1

6 6.1

7 7.1

7 7.2

8 8.1

Run Vacation Profile 1 1.1

17

Page 18: Tracing Requirements 1. The Role of Traceability in Systems Development  Experience has shown that the ability to trace requirements artifacts through

Mechanisms for Managing Traceability Matrices

For a large project creating and managing the traceability matrices can be an overwhelming task due to the problems of correctly updating the information when changes (e.g., to requirements) occur. Mechanisms to help include: Spreadsheets Relational Data Bases Specialized Traceability Management Tools

18