December 29, 2009
Debugging TestTrack Automation Rules
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:
- 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.
- 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.
- 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.
- 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.