December 29, 2009

Debugging TestTrack Automation Rules

Helix ALM
Using TestTrack's automation rules is a great way to populate field values, move an object through the workflow, interface with another system, and notify the right people about what is happening in their project.  Some of these rules can get complicated and often some tracing and debugging is necessary to make sure the rule is working as you designed it. Here are some steps to help debug an automation rule:
  1. Check the filter - If your automation rule uses a filter, make sure the filter is returning only the records you need.  The easiest way to verify the filter is to use it in a TestTrack list window or report.  It is critical that the filter returns only the records you need and no other records.  Changing the wrong records is just as bad as not changing the records you need.
  2. Use the Prevent action - If you are not sure that a trigger is firing at the correct time, add a Prevent action as the first action in the trigger's list.  This will allow you to see the message you wrote when the trigger is used.  Nothing is saved to the project when a Prevent action is used so remember to remove it when you are done.
  3. Check the Rules Log - If an automation rule cannot complete an action due to an error, the rule will be displayed in red on the configure automation rule window.  The "Rules Log..." button on this window allows you to view a list of all rule errors recorded for this project.
  4. Remember: An automation rule will not extend a user's security settings.  If a user does not have privileges to update a defect's field, any automation rule that tries to update the field triggered by that user will fail.  The Rule Log will capture the error.
Automation rules are a powerful tool in TestTrack and I recommend creating rules to handle simple tasks like email notifications and auto assignments.  As you get familiar with the power of these rules, you can have the TestTrack server do more to prevent invalid data entered in your project and reminders when tasks are overdue.  The steps mentioned here should help you make sure TestTrack is performing the tasks on the correct records.