When tests fail, you can tag owners in the Slack notification. Ownership rules are defined in a .empiricalrun/OWNERS.yaml file in your test repo.
Setup
Create .empiricalrun/OWNERS.yaml in the root of your test repository.
rules:
- match: { tag: "@payments" }
owners:
- slack: "U04ABCDEF"
Each rule has a match condition and a list of owners to mention.
Matching
By tag (exact match)
- match: { tag: "@payments" }
owners:
- slack: "U04ABCDEF" # Alice
- slack: "S07XYZ" # #payments-team group
- slack: "A08APPID" # Slack app bot
By file path (exact)
- match: { file: "tests/checkout.spec.ts" }
owners:
- slack: "U04ABCDEF"
By directory (glob)
# All tests under tests/checkout/
- match: { file: "tests/checkout/**" }
owners:
- slack: "U04ABCDEF"
By filename pattern (wildcard)
# All spec files directly in tests/api/
- match: { file: "tests/api/*.spec.ts" }
owners:
- slack: "U04ABCDEF"
* matches within a single directory, ** matches across directories.
All tests (catch-all)
- match: { file: "**" }
owners:
- slack: "U04ONCALL"
Use the Slack member ID, enterprise user ID, user group ID, or app ID directly:
- User:
U04ABCDEF (find via Slack profile → Copy member ID)
- Enterprise user:
W04ABCDEF
- User group:
S07XYZ (find via Slack admin → User groups)
- App:
A08APPID (find in the Slack app details URL)
The full mention syntax (<@U04ABCDEF>, <!subteam^S07XYZ>) is also supported.
App IDs mention the app’s bot user, which must be in the channel.
Behavior
- Rules are evaluated top-down; a test can match multiple rules
- All matched owners are mentioned (deduplicated)
- If
OWNERS.yaml is missing or invalid, notifications are sent without mentions