Updating the test case document: UsecaseScenarioMap

Use Case to Scenarios mapping provides a link between the project Use Cases that are identified for implementation and the test scenarios to run.

The Use Case to Scenarios mapping matrix serves the following purposes:
  1. Brainstorm and determine the scenario coverage for each use case.
  2. Help to ensure that each supported use case is covered by at least one scenario.
  3. Ensure use cases that contain common flows, such as logging in to store, are tested with multiple scenarios.
  4. Help identify any test gaps or areas where coverage can be reduced with minimal risk.
  5. When completed, this matrix gives an architect, test manager, and customer representatives a quick overview of the test coverage in comparison to the requirements defined in the Use Case document. This mapping allows traceability throughout the test cycle.
Use Cases
All the use cases that are supported by the project are listed in this left column.
Test Scenarios
All test scenarios that are tested in this project are listed in this top row.
Mapping Table
A matrix which shows the relationships between the Use Cases (down the left side) and the Test Scenarios (listed along the top).

Before you begin

This matrix can be updated many times throughout the creation of the test case document. These steps detail how to alter them from the provided samples which are based on the Starter Store. Do the following to determine what updates needed for the matrix:
  1. Identify any Use Cases that are added, altered, or removed during the requirements/design phase.
  2. Review the existing Test Scenarios that incorporate these altered Use Cases. Confirm if they must have other Use Cases that are removed or altered in each existing flow.
  3. Review the alterations to the Use Case and confirm if any new coverage is needed. If so, add Test Scenarios by following the instructions that are described in the following sub sections.
  4. Review overall matrix to ensure that each Use Case has adequate coverage or is not overly focused in this test phase.

Procedure

  • Add a use case

    If a new Use Case is added to the Use Case Document, follow the instructions to update the Use Case to Scenarios mapping matrix.

    A new Test Scenario is added as a result of Use Case addition. Typically, a new Use Case addition would result in a new Test Scenario addition to cover the added Use Case. Follow the instructions to update the matrix:

    1. Add the Use Case in the next available row or wherever it logically fits in the Use Case column. Group similar Use Cases together to allow for increased mapping efficiency.
    2. Scroll right to the next available Test Scenario column in the Scenario row.
      1. If the Use Case to Scenario mapping matrix has an available Test Scenario column, it can be used (a template Test Scenario column is available at the end of the matrix).
        1. Update the Scenario Name reference to point to the respective Scenario (Name) in the Test Scenario table in the Scenario to Use Cases mapping tab.
        2. Update the Scenario Name hyperlink to point to the respective Test Case table in the Test Cases tab.
      2. If the Test Case Document does not have a template Test Scenario column, do the following to create a new column:
        1. Copy the last Test Scenario column and paste it to the right end of the matrix and delete any existing mappings (‘X’).
          Notes:
          1. The spreadsheet auto calculates the name for the newly added Test Scenario. However, the spreadsheet cannot determine where the Scenario Name is located in the Scenario to Use Cases mapping tab. Thus, when the new Test Scenario column is originally added, it references the wrong name.
          2. The hyperlink in the Scenario Name references the same Test Cases table in the Test Cases tab as the cell that was copied.
        2. The Scenario Name reference needs to be updated after creating the new Test Scenario table in the Scenario to Use Cases mapping tab following the instructions in Scenario to Use Cases Mapping section
        3. The Scenario Name hyperlink needs to be updated after creating the new Test Cases table in the Test Cases tab following instructions in Test Cases section
    3. Place an ‘X’ in the cell that maps the new Use Case row and the new Test Scenario column.
      Note: Place an ‘X’ in all cells that map the new Use Case row to any applicable Test Scenario columns. Adding an ‘X’ for an existing Test Scenario column that did not have the mapping earlier means that a new Test Case is going to be added or an existing Test Case is going to be modified in that Test Scenario using the new Use Case flows.
    4. For each new mapping (‘X’) created, add a hyperlink to the ‘X’ cell that points to the appropriate Test Cases table in the Test Cases tab.
  • Existing Test Scenario is modified as a result of a new Use Case addition

    If you decide to test a new Use Case without adding a Test Scenario, existing Test Scenarios can be modified by updating or adding Test Cases. Follow the instructions to update the matrix:

    1. Add the Use Case in the next available row or wherever it logically fits in the Use Case column. Group similar Use Cases together to allow for increased mapping efficiency.
    2. Place an ‘X’ in all cells that map the new Use Case row to any applicable Test Scenario columns.
    3. For each new mapping (‘X’) created, add a hyperlink to the ‘X’ cell that points to the appropriate Test Cases table in the Test Cases tab.
  • A new Test Scenario is added without adding a new Use Case
    A new Test Scenario can be included to reduce risk in the test plan, even if no corresponding new Use Case is added. The new Test Scenario increases coverage in sensitive or risky areas specific to your project. Follow the instructions to add a Test Scenario to the matrix:
    1. Scroll right to the next available Test Scenario column in the Scenario row.
      1. If the Test Case Document has available unused Test Scenario column, it can be used. A sample template Test Scenario column is added at the end of the matrix.
        1. Update the Scenario Name reference to point to the respective Scenario (Name) in the Test Scenario table in the Scenario to Use Cases mapping tab.
        2. Update the Scenario Name hyperlink to point to the respective Test Cases table in the Test Cases tab.
      2. If the Test Case Document doesn’t have a template Test Scenario column, do the following to create a new column:
        1. Copy the last Test Scenario column and paste it to the right end of the matrix
          Notes:
          • The spreadsheet auto calculates the name for the newly added Test Scenario. However, the spreadsheet cannot determine where the Scenario Name is located in the Scenario to Use Cases mapping tab. Thus, when the new Test Scenario column is originally added, it references the wrong name.
          • The hyperlink in the Scenario Name references the same Scenario table in the Test Cases tab as the cell that was copied.
        2. The Scenario Name reference needs to be updated after creating the new Test Scenario table in the Scenario to Use Cases mapping tab following the instructions in Scenario to Use Cases mapping section
        3. The Scenario Name hyperlink needs to be updated after creating the new Test Cases table in the Test Cases tab following instructions in Test Cases section
    2. Place an ‘X’ in the cells that map the Use Case rows to any applicable new Test Scenario columns.
    3. For each new mapping ‘X’ created, add a hyperlink to the ‘X’ cell that points to the appropriate Test Cases table in the Test Cases tab.
  • A Use Case is modified that affects only the Test Cases within the same Test Scenarios
    1. No change is required to the matrix.
    2. Review the existing coverage to ensure that no new Test Scenarios must be added.
  • A Use Case is modified that introduces a new Test Scenario
    1. Update the Use Case title in the Use Case column if applicable.
    2. Follow steps 1 - 3 from section 5.3.2.1.2
  • A Use Case is modified that alters existing Test Scenarios
    1. Update the Use Case title in the Use Case column if applicable.
    2. Place an ‘X’ in the cells that map the updated Use Case rows to any applicable Test Scenario columns.
    3. For each new mapping ‘X’ created, add a hyperlink to the ‘X’ cell that points to the appropriate Test Cases table in the Test Cases tab.
  • A new Test Case is added without adding new Use Case or new Test Scenarios
    A Test Case can be added even when there is no new or modified Use Case. Doing so reduces risk in the test plan and increase coverage in sensitive or risky areas specific to your project.
    • No change is required to the matrix.
  • A Use Case is removed
    1. Using the font format strikethrough option, cross out the Use Case Row including the mapping X’s.
    2. Review the test coverage to ensure removing the test coverage that is related to the Use Case does not introduce any risks to the test coverage.
    3. Review the test coverage to check whether removing the Use Case is leaves any duplicate Test Scenarios.