September 12, 2012

How to Automatically Flag Linked Test Cases When a Requirement Changes

Helix ALM
Ever found yourself writing or running a test case, and thinking "I hope I'm working from the latest requirements?" That's the point of traceability—to make it possible for you to investigate that nagging concern so you can say with confidence "I hope I am working from the latest requirements." In TestTrack you can go one step further, and actually notify people when a requirement changes so they can skip the nagging concern part and jump right into getting their work done. You do this through the Suspect flag, which can be raised on any artifact to prominently show that something related to that artifact has changed. A while back I outlined some ways to mark dependent items as suspect to avoid creating or running stale test cases. Here I want to quickly show you how to automatically mark test cases as suspect any time a linked requirement is changed.

Set Your Criteria

With this kind of automated process, you'll want to use a filter to limit its impact. I'm going to create a straight-forward filter so that only changes to high-risk requirements with existing test cases trigger the suspect flag. [caption id="attachment_12001" align="aligncenter" width="512"] Filter on Link Type AND Risk[/caption]

Create the Trigger

Now that you have created a filter, you just need to set up the automation rule. Pick the filter you just created, trigger on change, and then use the Mark Suspects event to raise the suspect flag on linked test cases. If you don't have the Mark Suspects event, instructions for creating it are here. [caption id="attachment_12002" align="aligncenter" width="512"] Apply the Mark Suspect event on requirement changes[/caption] And that's all there is! If you find that it's not working as expected, make sure your filter is catching the requirements you think it is. This is the most common issue with automation rules—the filter doesn't work as intended either because the wrong criteria were used or the logic in grouping them isn't quite right.