/
Test Case Dependencies

Test Case Dependencies

Note: The Test Case Dependency feature is only available with the Advanced Features pack of QMetry.

Introduction

The Test Case Dependency feature helps the QA team efficiently manage the execution order of tests, ensuring a logical, organized and streamlined testing process. This dependency refers to the relationship between two or more test cases where the execution of one test case depends on the successful execution of another.

Testers can effectively define, track, and manage test case dependencies to ensure correct test execution order for maximum coverage and efficiency.

Successor and Predecessor Relationships Between Test Cases

  • Predecessor Test Case: A test case that must be executed before another. The success of the predecessor is essential for the execution of the successor.

  • Successor Test Case: A test case that depends on the successful execution of a predecessor. It cannot be executed until its predecessor has completed successfully.

Business Rules

  1. Predecessor and Successor Relationships:

    • A predecessor test case can have multiple successor test cases at the same level.

    • If a test case has a successor, it cannot have a predecessor.

    • A successor test case can only have one predecessor.

    • If a test case has a predecessor, it cannot have a successor.

  2. eSignature-Enabled Projects:

    • Test Case Dependency is allowed for both approved and unapproved test cases.

    • Only approved test cases will be linked to execution.

  3. Linkage Rules:

    • Only independent test cases can be linked.

    • Shareable test cases cannot be linked independently, as they are not independent entities and cannot be executed on their own.

Archival and Deletion Rules:

  1. Archiving Rules:

    • If a predecessor test case and its successors are linked within the same test suite and the predecessor is archived, the execution of successors will be blocked; it's recommended to remove dependencies before archiving.

    • Archiving a predecessor or successor retains their linkages, removable only upon test case deletion.

    • Archiving a predecessor with status "Failed," "Blocked," or "Not Run" blocks successor execution until unarchived or dependencies are removed.

    • Archiving a predecessor with status "Passed" or "Not Applicable" allows execution of successors.

Deletion Rules:

  1. Archiving and then deleting a predecessor test case ends its dependencies with successor test cases, treating the successors as independent test cases.

Operation

Will test case dependency be retained?

Operation

Will test case dependency be retained?

Project Clone

Y

Copy test cases in the same project

N

Copy test cases in other projects

N

Move test cases in the same project

Y

Move test cases to other projects

N

Enable Test Case Dependency

The Test Case Dependency feature ensures that test cases are executed in a specified order, especially when execution of one test case depends on the outcome of another. This approach helps in maintaining the integrity and reliability of test results.

Users can effectively enable test case dependency management for more robust and reliable test suites. Navigate to:

Projects > Project/Release/Cycle > General Settings

To enable Test Case Dependency in a project, follow these steps:

  1. Select the project.

  2. Open the General Settings tab.

  3. Enable the Define Dependency Between Test Cases option.

Notes:

  • Execution details will not be visible if the same test case is linked multiple times to a test suite through an Automation API request.

  • Test case import does not support importing test case dependencies.

image-20240724-072817.png

Configure Execution Status

QMetry allows users to configure how the execution statuses of predecessor test cases impact the execution and status of successor test cases. To set this up, navigate to:

Customization > Execution Status

image-20240712-092258.png
  • Allow Execution of Successor: If selected, successor test cases can only be executed if their predecessor possess the execution statuses as per the selected checkboxes. “Passed” or “Not Applicable” statuses are selected by default and cannot be altered.

  • Auto Propagate Status to Successor Test Case: Auto Propagation manages how status changes in predecessor test case affect linked successor test cases. The behavior varies based on the initial status of the test case.

When Auto Propagate Status is ON:

  • For 'Blocked', 'Failed' or any status above Not Run, the successor test case status will be set to "Blocked."

  • For Status ‘Not Run’ the successor test case status will be set to "Not Run".

  • For statuses Below ‘Not Run’ - Auto Propagation do not apply.

When Auto Propagate Status is OFF:

  • The successor test case status remains unchanged.

This feature ensures that linked test cases reflect the most accurate status updates automatically, based on the chosen configuration for Auto Propagation.

Define Test Case Dependency

Test case dependencies can be defined from the Test Case Module - Dependent Test Cases Screen, but only if this feature is enabled at the project level. To access the test case dependency screen, navigate to:

Test Cases > Dependent Test Cases

image-20240724-073645.png

Link a Predecessor Test Case

The user can link only one predecessor to each test case. The predecessor's status will influence the successor's execution.

Navigate to:

Test Cases > Dependent Test Cases

To establish a predecessor relationship for a test case:

  1. Navigate to the “Dependent Test Cases” Page within a test case.

  2. Click the "Link Predecessor" button.

  3. Choose the predecessor test case from ‘Link Predecessor Test Cases To Define Dependency’ Screen.

  4. Select the test case and click "Link & Close" to complete the process.

image-20240724-085606.png

Once a test case is linked as a "Predecessor" to the current test case, the current test case is designated as the "Successor," identifiable by a tag on the right side.

Notes:

  • Only one predecessor test case can be linked with a successor test case.

  • Shareable test cases cannot be linked as dependent test cases.

  • Once a predecessor is linked with a test case, the “Link Predecessor”, “Link Successor” and “Link by Entity Key” buttons are disabled.

Tags

When the user links a successor to a test case, it automatically becomes a successor, and the tag “Successor” appears on the screen.

image-20240724-090610.png

The linked predecessor is labeled as "Predecessor" and is shown on the predecessor test case's “Dependent Test Cases” screen.

image-20240724-090352.png

Link Successor Test Cases

The user can mark a test case as a predecessor and link multiple successor test cases to it.

Navigate to:

Test Cases > Dependent Test Cases

To link Successor Test Case to a Test case, follow these steps:

  1. Navigate to the “Dependent Test Cases” Page of the successor test case.

  2. Click the "Link Successor" button.

  3. Choose the successor test case from the ‘Link Successor Test Cases To Define Dependency’ Screen.

  4. Select the test case and click "Link & Close" to complete the process.

image-20240724-092312.png

Link By Entity Key

The user can also link a test case as predecessor/ successor by using test case entity keys.

Navigate to:

Test Cases > Dependent Test Cases

To link Test Cases as successor or predecessor via entity key, follow these steps:

  1. Navigate to the “Dependent Test Cases” Page of the successor test case.

  2. Click the "Link By Entity Key" button.

  3. Select the dependency type: Successor or Predecessor.

  4. Enter the Test case entity keys to be linked.

  5. Click on "Link" to complete the process.

Note:

  • If the test case is already labelled as a Predecessor or Successor, then the option to select Dependency Type is disabled.

  • The Entity Key field allows the user to enter a maximum of 500 entity keys at a time. Only alphanumeric, space, and hyphen values are accepted.

  • The user can also mention the cross-project test case keys to link. The Define Dependency for Test Case option should be enabled in that cross-project.

image-20240724-094603.png

Test Case List View

User can view the Successor and Predecessor count in the test case list view.

Navigate to:

Home > Test Cases

Add Successor and Predecessor Columns in List View

Open the Arrange Columns drop-down and select the Successor and Predecessor columns.

image-20240724-095406.png

View Predecessor and Successor Counts in List View

The count of successor test cases and predecessor test cases are displayed on the screen.

image-20240724-095719.png

View Linked Successors/Predecessor from List View

Click on the count in the Predecessor/Successor column to drill down and view the linked test cases.

image-20240724-095809.png

Test Suite View

The user can check dependent test cases for a test suite from:

Home > Test Suites > Test Cases

View Successor/Predecessor Test Cases from Test Suite

In this screen, the successor and predecessor columns show the count of dependent test cases.

  • Count in Green - All the successor test cases are linked to the test suite.

  • Count in Blue - All the successor test cases of the predecessor test case are not linked to the test suite.

image-20240724-100655.png

View Successor Test Cases for the Predecessor

Clicking on the successor count reveals the successor test cases for the predecessor. This allows users to identify which successor test cases are not linked to the test suite.

image-20240724-101517.png

View Predecessor Test Cases for the Successor

Clicking on the predecessor count shows the details of the predecessor test case.

image-20240724-101644.png

Test Execution Screen

Users can view test case dependencies on the test execution screen in both the Test Execution Detail View and the Test Execution Default View.

Test Execution Detail View

To view test case dependency from test case detail view navigate to:

Home > Test Suites > Test Execution > Test Execution Detail View

To access Test Execution Detail view, follow these steps:

  1. Click on ‘Switch to Detail View’ on the Top Right corner of the screen.

image-20240724-103004.png
  1. In the Detail View screen, click on the Test Case Entity Key.

image-20240724-103122.png
  1. Navigate to the Dependent Test Cases Tab

image-20240724-103608.png

Test Execution Default View

The user can also view test case dependencies from the Test Execution Default View.

To access text execution default view, follow these steps:

  1. In the Default View screen, click on the Manage Columns icon and select the Successor and Predecessor columns.

image-20240724-103734.png
  1. The successor and predecessor columns in the test case run view displays the counts of associated successor and predecessor.

image-20240724-104639.png
  1. Click on the count to navigate to the test execution screen. Users can view the relevant test cases under the Dependent Test Cases tab.

image-20240724-105015.png

Test Execution Dependency

Test execution dependency refers to the order in which successor test cases within a test suite must be executed due to their reliance on the outcomes of predecessor test case.

Business Rules

  • Same Test Suite vs. Different Test Suites:

    • Same Test Suite: Successor test case execution is restricted until its predecessor is executed, regardless of execution order.

    • Different Test Suites: Test cases are treated as independent; no execution dependency is enforced.

  • Status Changes After Execution:

    • Already Executed Successor: If a Successor test case has been executed and its Predecessor is subsequently linked, the Successor’s status remains unchanged. The user cannot change Successor’s execution status until its Predecessor test case is executed, regardless of execution order.

    • Not Run Status: Applies when the latest version of the Predecessor is marked as “Not Run” and the Successor is already executed.

  • Copying Test Suites:

    • Status Preservation: When a test suite is copied, the Successor's status is preserved unless the copy is marked as "Not Executed."

  • Bulk Execution:

    • Execution Screen: Successor test cases blocked by the predecessor cannot be selected for execution.

    • Bulk Execute: Successor test cases blocked by the predecessor can be selected, but execution is skipped, and their status remains unchanged.

  • Predecessor Failure or Blockage:

    • Status Modification: By default, successor test cases’ statuses cannot be modified if the Predecessor fails or is blocked. The status of the successor test case will automatically be set based on the Predecessor Test case or according to the status defined in the Configuration > Execution Status.

  • Iteration Execution:

    • Linked Test Cases: Status of the Successor test case depends on all iterations of the Predecessor being executed. The automatic propagation of status to the successor test case will depend on the highest level of execution status priority of the linked predecessor test case.

Example of Execution Dependency

Let’s understand this with an example.

TC- 88 is Predecessor to TC- 63, TC-62, TC-2 and TC-3. These test cases can be linked with the same test suite or can be linked to different test suites independently.

Here, all these test cases are linked with the same test suite TS-21.

image-20240724-111712.png

Execute Predecessor Test Case

To execute predecessor test case, follow these steps:

  1. Navigate to test execution screen to execute interdependent test cases.

image-20240724-112212.png
  1. Users cannot execute the successor test cases (TC - 62, TC - 63, TC - 2, TC - 3) until its predecessor test case (TC - 88) has been executed. Details of the predecessor test case can be viewed by hovering over the Execution Status of the successor test case.

image-20240724-112802.png
  1. Users will have the option to send an email notification to the assignees of the successor test cases, informing them that the executions are now unblocked. Select the checkbox to send the notification, or leave it unchecked otherwise.

image-20240724-114410.png

Execute Successor Test Case

Once the predecessor is executed, the execution of the successor test cases is unblocked. Assignees can now proceed to execute the successor test cases.

image-20240724-114529.png

→ When Auto Propagate Status to Successor Test Case is enabled: If the predecessor test case is failed or blocked, then the successor test cases will be not allowed to execute, and the status will be set to ‘blocked’.

→ When Auto Propagate Status to Successor Test Case is disabled: If the predecessor test case is ‘failed’ or ‘blocked’, the successor test cases cannot be executed and will be marked as "Not Run".

An alert message will appear upon selecting either "Failed" or "Blocked" status for the predecessor test case.

image-20240527-141721.png

Unlinking Test Cases

There are two ways to unlink the linked predecessor/ successor test case:

  • Directly click on the Unlink icon for the test case.

  • Select the test case and click on the Unlink Selected button above.

image-20240806-140243.png

Change Log

Users can view the change log related to test case dependency under

Audit Compliance > Change Log Report

image-20240528-100810.png

Test Cases Dependency Report

The Test Case Dependency Report reveals relationships between test cases, helping testers and managers understand dependencies and plan execution. It aids in planning, prioritizing, and executing test cases to ensure comprehensive coverage and timely software delivery.

Navigate to:

Home > QMetry System Report > Test Cases Dependency Report

image-20240524-072654.png

Trace by Test Cases

Users can generate the report for preferred test cases. Click on the Trace by Test Cases button at the top.

image-20240524-072738.png

Users can apply filters to narrow down the list of test cases. Select the desired test cases from the filtered list and click "Apply" to generate a report for the selected test cases.

image-20240524-074628.png

The report is generated for the selected test cases.

image-20240524-074956.png

To reset the applied filter, click on the Reset button.

Test Case Execution Dependency Report

The Test Case Execution Dependency Report helps in understanding the order in which test cases should be executed and identifies any potential issues or bottlenecks in the testing process. This report is essential for test managers to plan and execute testing activities effectively. It is also helpful in ensuring comprehensive coverage and timely completion of testing processes.

To access this report, navigate to:

Home > QMetry System Report > Test Case Execution Dependency Report

image-20240524-081016.png

Trace by Test Suite

Users can generate the report for preferred test cases by clicking on Trace by Test Suite button at the top.

image-20240524-081119.png

The following filters can be applied to shortlist the test suites:

  • Dependency Type: Filter for Test Case Dependency Type i.e., Successor or Predecessor. The test suites associated with the specific dependency type will be displayed.

image-20240524-082328.png

Select test suites from the displayed list and click Apply to generate the report for the selected test suites.

image-20240524-082632.png

The report is generated showing the test case details for the selected test suites.

image-20240524-082826.png

To reset the applied filter, click on the Reset button.

Export Reports

Users can export test case dependency report and test case execution dependency reports in two formats.

  • XLSX format

  • CSV format

The steps to exporting the reports are same for both types of reports.

Steps to Export Report

  • Click on the Cog icon ( ) and select the format to export the report details.

image-20240524-093701.png
  1. To see the progress of the test case export, go to the Scheduled Task section at the top by clicking on the icon.

  2. Once the process is complete, click on the download icon to download the report.

image-20240524-094001.png

 

Related content