Knowledge Base Administration Guide

Rules

Simscope Rules are automatic assignments to be performed on matching jobs within a Signature.

Think of them like "email rules in your inbox", where instead of matching incoming emails, Rules match simulation fails, within Signatures.

Standard Rule Workflow

Workflow

The standard Rule Workflow is a three-step process:

  1. Create a Signature Rule and assign to a user.
  2. Mark a bug on the Rule, and move to OPEN state.
  3. Resolve the Bug (either as Fixed or Wontfix).

NOTE: steps 1 or 2 can be bypassed, if a Bug is already open, or if a Fix has already been committed.


Rule Fields

Fields

Rules are composed of:

  1. Trigger — what causes the rule to activate
  2. Action — what happens once a rule matches

Rule Trigger

The Rule Trigger is what causes a rule to activate.

FieldExampleDescription
Signature1249Signature to match
BranchmasterBranch to match
Querycomponent=fpu, message=~TOPQuery to match

NOTE: the Query field must contain at least 1 component.

Rule Action

The Rule Action is what happens to each Signature job which matches the trigger:

FieldExampleDescription
Assigneebob.jeffriesSignature assignee
StateOPENSignature state
IssueSIM-99Issue ID (Bug or Tag)
Fix ID15949 (checkin #)(only for FIXED rules)

Example Rule Scenario

For example, you can create a rule to automatically mark all Signature 12 jobs:

  • on branch default
  • on any component

To:

  • Open state
  • Bug 143
  • assigned to Fred Wilson

With this rule, all future regressions containing fails matching Signature 12 will get updated to Open, Bug 143, Fred Wilson.


Each Signature can have 1 or more Rules.

  • However, each Rule only works on 1 Signature.

For example: Signature 112 may have 3 Rules, but each of these rules only operates on Signature 112.


How to match multiple components in a single Rule?

Use the =~ operator to match Regular Expressions in the job search.

To match all components containing foo_:

component=~foo_

To match multiple components, use the | (pipe) operator.

  • This example matches two components:
component=~alpha_one|alpha_two

To match all components within a project, prefix the project name with the @ operator.

  • This example matches all components under project ZETA:
component=~@ZETA

How do I create a Rule?

Rules can be created either from the Signature Search page, or from the Signature Details page.


Rule Naming

Simscope automatically names Rules as the format SIGNATURE.RULENUM. For example, the first rule in Signature 19 will be Rule #19.1. The second will be Rule #19.2. And so on.


Rule Matching

It is possible for multiple rules within a signature to be possible candidates to match an incoming job (ie rules can be ambiguous).

Simscope only executes the first matching rule for a job, checking in Priority order. All other potential matching rules will be ignored.

See the Priority section for more info.


Rule Best Practices

#1. Don't add single-regression filters to rules.

This will make them only match a single regression. Future regressions will not match the rule.

Here is an example Bad Rule, which only matches a single regression:

regr=myregr/12

Here is a Good Rule (match all myregr regressions):

regr=~myregr