0
0
Testing Fundamentalstesting~20 mins

Traceability matrix in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Traceability Matrix Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of a Traceability Matrix

What is the main purpose of a traceability matrix in software testing?

ATo document the project schedule and milestones
BTo list all bugs found during testing with their severity
CTo track the number of test cases executed per day
DTo map requirements to test cases ensuring all requirements are tested
Attempts:
2 left
💡 Hint

Think about how testers ensure every requirement is covered by tests.

Predict Output
intermediate
1:30remaining
Traceability Matrix Coverage Count

Given the following traceability matrix represented as a dictionary where keys are requirement IDs and values are lists of test case IDs, how many requirements have no test cases linked?

Testing Fundamentals
traceability_matrix = {
  'REQ-1': ['TC-1', 'TC-2'],
  'REQ-2': [],
  'REQ-3': ['TC-3'],
  'REQ-4': []
}

count = sum(1 for tests in traceability_matrix.values() if len(tests) == 0)
print(count)
A2
B1
C3
D0
Attempts:
2 left
💡 Hint

Count how many requirements have empty test case lists.

assertion
advanced
2:00remaining
Valid Assertion for Traceability Matrix Completeness

Which assertion correctly verifies that every requirement in the traceability matrix has at least one test case linked?

Testing Fundamentals
traceability_matrix = {
  'REQ-1': ['TC-1'],
  'REQ-2': ['TC-2', 'TC-3'],
  'REQ-3': ['TC-4']
}
Aassert any(len(tests) == 0 for tests in traceability_matrix.values())
Bassert len(traceability_matrix) == 0
Cassert all(len(tests) > 0 for tests in traceability_matrix.values())
Dassert all(len(tests) == 0 for tests in traceability_matrix.values())
Attempts:
2 left
💡 Hint

Think about how to check that no requirement has zero test cases.

🔧 Debug
advanced
2:00remaining
Find the Bug in Traceability Matrix Test Coverage Code

Identify the error in the following code snippet that aims to print requirements without test cases:

Testing Fundamentals
traceability_matrix = {
  'REQ-1': ['TC-1'],
  'REQ-2': [],
  'REQ-3': ['TC-2']
}

for req, tests in traceability_matrix.items():
  if tests == None:
    print(req)
AThe loop should iterate over traceability_matrix.keys() instead of items()
BThe condition should check if tests is an empty list, not None
CThe print statement should be outside the loop
DThe dictionary keys are invalid and cause a runtime error
Attempts:
2 left
💡 Hint

Think about what value an empty list has compared to None.

framework
expert
2:30remaining
Traceability Matrix Integration in Test Automation Framework

In a test automation framework, which approach best integrates a traceability matrix to ensure all requirements are tested automatically?

AUse a mapping file linking requirement IDs to test case IDs, and generate reports showing coverage after test runs
BManually check test cases against requirements after each test run without automation
CStore test cases and requirements separately without linking, relying on testers to verify coverage
DOnly automate test execution without tracking requirement coverage
Attempts:
2 left
💡 Hint

Consider how automation can help track coverage and generate reports.