Share
Explore

Creating a Traceability Matrix as the concluding step of their Unified Process Methodology

Lab lecture instruction workbook to guide students through creating a Traceability Matrix as the concluding step of their Unified Process Methodology. This will help them ensure proper relationships between requirements and method calls, identify test oracles, and eliminate unnecessary code.
Lab Lecture Instruction Workbook: Creating a Traceability Matrix
Objective: By the end of this lab, students will understand how to create and use a Traceability Matrix to verify the relationship between requirements and method calls in their ExoticEscapes Travel Agency project.
Part 1: Introduction to Traceability Matrices
A Traceability Matrix is a document that maps requirements to their implementing components, in our case, method calls. It helps ensure that all requirements are met and that there's no unnecessary code.
Key benefits:
Ensures all requirements are implemented
Identifies unnecessary code (dead execution paths)
Aids in impact analysis when requirements change
Supports comprehensive testing
Part 2: Creating the Traceability Matrix
Step 1: List Requirements List all the requirements from your use cases in the left column of a spreadsheet or table.
Example: R1: Customer can browse exotic destinations R2: Customer can create a custom travel package R3: Customer can book a travel package
Step 2: List Methods List all the methods from your UML class diagrams across the top row.
Example: M1: Customer.browseDestinations() M2: TravelPackage.customizeItinerary() M3: Customer.bookPackage()
Step 3: Map Requirements to Methods Place an "X" or "1" in cells where a method implements a requirement.
Example:
Copy
| M1 | M2 | M3 |
---------|----|----|----|
R1 | X | | |
R2 | | X | |
R3 | | | X |
Exercise 1: Create a basic Traceability Matrix for the ExoticEscapes system using at least 10 requirements and 15 methods.
Part 3: Analyzing the Traceability Matrix
Step 1: Identify Unmapped Requirements Look for rows with no Xs. These are requirements without implementing methods.
Step 2: Identify Unused Methods Look for columns with no Xs. These may be unnecessary methods or dead execution paths.
Step 3: Identify Over-mapped Requirements Requirements mapped to many methods may indicate overly complex implementation or poorly defined requirements.
Exercise 2: Analyze your Traceability Matrix. Identify any unmapped requirements, unused methods, or over-mapped requirements.
Part 4: Using the Traceability Matrix for Test Oracles
A test oracle is a mechanism for determining whether a test has passed or failed. The Traceability Matrix can help create test oracles by showing which methods should be tested to verify each requirement.
Step 1: For each requirement, list the methods that implement it. Step 2: Create test cases that exercise these methods. Step 3: Define expected outcomes based on the requirement.
Example: R2: Customer can create a custom travel package Implementing method: TravelPackage.customizeItinerary() Test Oracle:
Call customizeItinerary() with valid customer preferences
Verify that the returned itinerary matches the preferences
Verify that the itinerary is within the customer's specified budget
Exercise 3: Create test oracles for at least 3 requirements in your ExoticEscapes system.
Part 5: Refining the Implementation
Step 1: Implement Missing Functionality For any unmapped requirements, create new methods or modify existing ones to fulfill the requirement.
Step 2: Remove Dead Code For any unused methods, consider removing them if they truly serve no purpose.
Step 3: Refactor Complex Implementations For over-mapped requirements, consider refactoring to simplify the implementation.
Exercise 4: Based on your analysis, propose changes to your ExoticEscapes implementation. List at least one change for each category: new functionality, code removal, and refactoring.
Part 6: Maintaining the Traceability Matrix
The Traceability Matrix should be a living document, updated as the project evolves.
Best practices:
Update the matrix when requirements change
Update the matrix when adding or removing methods
Use the matrix during code reviews to ensure continued alignment
Revisit the matrix during testing phases
Exercise 5: Describe a process for maintaining the Traceability Matrix throughout the development lifecycle of the ExoticEscapes project.
Conclusion: The Traceability Matrix is a powerful tool for ensuring that your implementation aligns with requirements, identifying areas for improvement, and supporting testing efforts. By mastering this technique, you'll be better equipped to deliver high-quality software that meets all specified requirements.
Final Assignment: Create a comprehensive Traceability Matrix for your ExoticEscapes Travel Agency project. Include all requirements and methods, perform a thorough analysis, create test oracles for key features, and propose specific improvements to your implementation based on your findings. Submit your matrix, analysis, test oracles, and proposed changes.
This lab workbook guides students through creating and using a Traceability Matrix, emphasizing its importance in connecting requirements to implementation, supporting testing, and driving code quality improvements. It provides hands-on exercises to reinforce learning and apply the concepts directly to their ExoticEscapes project.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.