Writing TestRail Cases
- The Four Golden Rules
- Navigation — write it exactly like this
- Buttons
- Dropdowns and selecting a value
- ⚠️ Traps (these fall through to the slow LLM
interact) - Preconditions — use the exact trigger phrases
- Control / repeat constructs (understood verbatim)
- The Expected field
- Case skeleton (copy and fill)
- Checklist before saving the case in TestRail
- After editing in TestRail
How to phrase TestRail steps and preconditions so they convert into deterministic actions in the Test Agent.
The Smart Converter turns each step’s text
into an action using a regex grammar. When your wording matches a pattern, the
step runs deterministically (fast, stable, type: nav). When it doesn’t, the step
falls back to an LLM interact (slow, non-deterministic, may fail to find the
element). This page tells you how to write so steps land on the deterministic path.
|
At a glance
|
All example phrasings are in English — the converter grammar matches English
text. Use straight quotes "…". Curly quotes (“ ” ‘ ’), en/em dashes, and Cyrillic
look-alike letters are auto-normalised, but prefer plain ASCII.
|
The Four Golden Rules
-
Quote the UI label — exactly as it appears on screen.
-
Name the element type — recommended —
button/tab/widget/sidebar/drop-down/option/section. It is what makes a step deterministic, but it is not mandatory: a step without it still runs via the slower LLM path. It matters most for widgets, tabs and the sidebar; plain buttons the LLM usually clicks fine by their label. -
Use the canonical verb for that type (see the tables). Wrong verb → falls through to
interact. -
Be concrete — avoid blanket or spatial wording. A step must name one explicit UI action, not a goal or a position. Phrasings like
Perform all required actions to make the "Save" button activeorPerform all required actions to create any diagnostics group update, and positional descriptions like "the button in the top-right" or "the third row", give the converter nothing to match — they fall through to a slow LLMinteract(or get guessed wrong). Write the concrete click(s) instead. If it is environment setup (e.g. "create a diagnostics group update"), move it to Preconditions with a recognised trigger phrase.
Navigation — write it exactly like this
| Goal | ✅ Write this | ❌ Don’t write |
|---|---|---|
Login |
|
|
Open a device |
|
|
Tab |
|
|
Left menu / sidebar |
|
|
Widget / cube |
|
|
Section |
|
|
Left menu — supported forms
Both from the left menu and in the sidebar resolve to a sidebar nav, but they are two
different patterns with different verbs and quoting rules — don’t assume they are
interchangeable.
Anchor from the left menu (also from the left-hand menu / from the left-side menu):
-
Allowed verbs:
Select/Click/Choose/Open/Expand. -
The label must be in quotes.
-
You may optionally insert
theand a descriptor noun (item/tab/option/section/entry) between the label andfrom. -
Examples:
-
Select "Settings" from the left menu -
Select the "Settings" tab from the left menu -
Select the "System Settings" item from the left menu -
Expand the "System Settings" item from the left menu(verbExpandis OK too) -
Open "Provision manager" from the left menu
-
Anchor in the sidebar:
-
Allowed verbs: only
ClickorNavigate—Select/Choose/Open/Expanddo not match here (they fall through tointeract), even though they work forfrom the left menu. -
Quotes are optional here, but still write them for consistency.
-
Example:
Click "Device Diagnostics" in the sidebar.
When in doubt, prefer the from the left menu form — it accepts more verbs and is the
better-tested path.
|
Buttons
| ✅ Write this | ❌ Don’t write |
|---|---|
|
|
|
— |
-
Canonical button verb:
Click(orUse). The literal wordbuttonoriconis required. -
The form
Use "<button>" to <verb>(verbs:open,create,add,view,run,start,save,apply,generate,delete,edit,send) treats the quoted token as the button and the tail as the destination — keeps the tail from being read as a menu item. -
Checkbox + button in one sentence:
Select the device by its check-box and click the "Uninstall" button→ becomes two actions (tick the row, then the button).
Dropdowns and selecting a value
| Goal | ✅ Write this |
|---|---|
Open a dropdown |
|
Open + pick |
|
Pick from an open menu |
|
Pick a value |
|
Named field-dropdown |
|
-
The word
drop-down/dropdown/drop downis required forExpand. -
Strict field names (suffix optional):
Period,Tariff plan,Tariff,Device group,Diagnostic type(alsoDiagnostics type),Time range,Channel bandwidth,Operating standard. -
Loose field names (
group,band,range,frequency) require an explicit suffixfield/drop-down/list/selector:Select "5GHz" from the band field✅, butSelect "5GHz" from the band❌ (falls through tointeract).
⚠️ Traps (these fall through to the slow LLM interact)
-
No quotes around the label in a tab / section / left-menu / dropdown / select step. (Exception: the
in the sidebarform treats quotes as optional — but quote anyway for consistency.) -
Wrong verb for the anchor:
Openfor a tab/widget;Pressfor a button;Go tofor a widget;Select/Choose/Open/Expandwith thein the sidebaranchor (usefrom the left menufor those verbs, orClickwith the sidebar anchor). -
Missing the type word (
tab/button/widget/section/sidebar/drop-down). -
Open device <subview>—trace,setting(s),tree,info,activity,history,diagnostic(s),map,menu,sidebar,group,profile,model,type,list,location,configurationare deliberately not treated as "open the device" (they are sub-views of an already-open device). Phrase these as a tab or left-menu nav instead. -
… by clicking on itwithout the worddevice(e.g.Open the diagnostic by clicking on it) — staysinteract.
Preconditions — use the exact trigger phrases
The converter turns precondition text into pre-flight actions that actually configure the environment before the run (see Run-Time Pre-Flight). Phrase them so the trigger matches:
| What to set up | Trigger wording in the precondition |
|---|---|
Create monitoring |
|
Diagnostics performed |
|
Group update (diagnostic) |
|
Interference / auto-channel |
|
Deployment file |
mention |
UI setting |
|
ACS overwrite-provision |
|
ACS credential length |
|
Raw ACS task |
an |
-
Start each new precondition with
Make sure that …,Make sure …, or a number1. …(the number needs a literal dot:1., not1)). -
Recognised diagnostic names:
IP Ping,Download,Upload,NSLookup,Traceroute(the aliastracealso resolves to Traceroute),Neighboring Wi-Fi. -
ShowPasswordAsPlainTextaccepts only=as the separator (ShowPasswordAsPlainText = true), notset to/is.MonitoringSelectNode…andoverwriteProvisionParametersare more lenient (=/is/set to/toall work). When unsure, use=. -
For the
<Parameter> = <true|false>UI-setting triggers, the menu path is optional — the converter matches theParameter = valuetoken anywhere in the precondition and ignores trailing text, soShowPasswordAsPlainText = trueandShowPasswordAsPlainText = true in Settings > System settings > Interfaceare equivalent. Just keep the parameter and its value together (path after the value, never between them). -
Pure-calculation lines (
Make sure…,Ensure…,Verify that…,Param = value;,The sum of…,RSSI … equal …) are recognised as setup, not UI steps — that is expected.
Control / repeat constructs (understood verbatim)
-
Repeat steps 3-10/Repeat 3-10 -
Repeat 3-10 steps for "5" GHz and "6" GHz bands(expands variants) -
See the expected result 1 -
Wait until …(attaches to the previous click as a wait-for-content-change)
The Expected field
-
Fill in Expected on every verification step. The agent compares the live page against your Expected to decide whether the step passed — it is the step’s success condition.
-
A verification step with an empty Expected passes silently without checking anything. This is the real danger, and it is worse than a failure: the agent has no success condition, so it does not re-check the page or time out — it just reports the step green even when the page is broken. A missing Expected hides real bugs behind a passing run. (It does not "break" the step; it removes the verification entirely.)
-
Describe a concrete, observable result — which page opened, which buttons/fields are present, which value is shown. Avoid vague wording like "works correctly".
Case skeleton (copy and fill)
Title: Management Portal > <Area> > <Sub-area> > <What is verified>
Preconditions:
Make sure that <condition 1, exact trigger phrase>.
Make sure that <condition 2>.
Steps:
1. Log into the Angular Management Portal
2. Select "<Item>" from the left menu
3. Select the "<Sub-item>" item from the left menu
4. Go to the "<Tab>" tab | Expected: <page/elements open without errors>
5. Click the "<Button>" button | Expected: <what appeared/changed>
6. Expand the "<Field>" drop-down and select the item corresponding to "<Value>"
7. <Verification> | Expected: <concrete observable result>
Checklist before saving the case in TestRail
-
Every UI label is in straight quotes and matches the screen.
-
Recommended: navigation steps name the element type (tab/widget/sidebar/drop-down) for the deterministic path — optional for plain buttons.
-
The verb is canonical for the element type (see the tables).
-
Left menu uses
… from the left menuor… in the sidebar. -
Every verification step has a concrete Expected.
-
Preconditions start with
Make sure that …and use the exact trigger phrases. -
No
Open device settings/trace/treefor navigation (use a tab or the left menu).
After editing in TestRail
After you change a case in TestRail, reimport it into the Test Agent
(Reimport After Converter Changes) — the old YAML in the
persistent volume is not overwritten automatically. Tick Force refresh (or pass
force_refresh: true) to bypass the Stage-2 idempotency cache.