Usage References
Most editable entities in msg.ZenTestAI can be referenced from somewhere else — a snippet from many tests, a macro from many steps, a script from many tests, a user from many tests, and so on. The Usage References view answers the question "where is this used?" in one click.
This page is the canonical description of how usage references work; entity-specific chapters link here rather than repeating the details.
Where the button lives
On supported entities the Usage References button sits in the header of the editor (typically the right-hand sidebar that opens when you click a row in a list). The exact icon and label varies a bit between editors, but the function is the same.
| Entity | Usage References available? |
|---|---|
| Test Cases | ✅ |
| Snippets | ✅ |
| Macros | ✅ |
| Scripts | ✅ |
| Files | ✅ |
| Users | ✅ |
| Application Settings hosts | ✅ |
| Execution Plans | ❌ |
| AI Models, External Systems | ❌ |
The button is always available — you don't need to attempt a delete to see it. The list it shows is the same set of references the system uses to decide whether a delete should be blocked, just surfaced proactively.
What the popover shows
Clicking the button opens a small popover with one row per usage:
- a type icon showing what kind of thing is referencing the entity (test, plan, host, …),
- the name of the referencing item, as a link — clicking the row jumps you straight to that item,
- a short relation label (e.g. "used in test", "included in test set", "agent of test"),
- a count badge when the same item references the entity in more than one place (e.g. a macro used in three different steps of the same test).
If nothing references the entity, the popover shows an empty state.
What gets tracked
The following relations are recognized today:
- Tests → Snippets — every snippet-reference step.
- Tests → Macros — every
${=macro(...)}call in step descriptions and parameter values. - Tests → Execution Plans — every test included in a plan.
- Tests → User / Agent — the user assigned to the test (and per-step overrides where applicable).
- Tests → Script — every script-function reference from a step.
- Tests → File — every file referenced for upload/download.
- Tests → Application Settings host — the host profile the test is bound to.
So opening Usage References on a snippet, macro, script, file, user or host lists the tests that reference it. Opening it on a test lists the execution plans that include the test.
Permissions and visibility
The button is available to anyone who can open the entity's editor — there is no separate permission for it. The same product-scope rules apply: you only see references from items in your own tenant.
Relationship to deletion
Deleting an entity that is still referenced may be blocked or warned about, depending on the entity. The Usage References popover is the recommended way to find and clean up the references first — much friendlier than discovering them through a blocked delete dialog.