Demo
04 WRITING GUIDE

Interaction writing guide

2 MIN READ

This guide defines the right way to describe application interactions to TestZeus. It is a customer-facing operating standard, not a collection of suggestions: a test written against it behaves the same way on every run, on every environment, and for every author who picks it up afterwards.

Every instruction must tell TestZeus:

  1. Which component to use.
  2. How the user recognises it on the screen.
  3. What value or state the component must receive.
  4. Where the component is located, when the label is not unique.
  5. What state to assert — only when that state is part of the testcase's acceptance criteria.

The universal action pattern

Every interaction follows one shape:

text
<action> <value or desired state> in/on/from the <component type> named <visible label>, within <scope>
gherkin
When I select "Healthcare" from the "Industry" picklist in the "Account Information" section

Add a Then only when the testcase is intended to assert the selected value:

gherkin
When I select "Healthcare" from the "Industry" picklist in the "Account Information" section
Then the "Industry" picklist should show "Healthcare"

Non-negotiable rules

  • Name controls by their visible label or accessibility name.
  • State the component type whenever the interaction depends on it.
  • Quote exact labels, option names, button names, headings, and messages.
  • Scope duplicate labels by section, modal, row, card, panel, or tab.
  • Describe the desired final state, not merely the physical action.
  • Write checkboxes, radio buttons, and switches as state assignments, never blind toggles.
  • Select picklist and combobox options using the exact option text shown by the application.
  • Set controlling fields before dependent fields.
  • Keep credentials, tokens, URLs, and customer data in environment or test-data variables.
  • Use Then only for an actual testcase assertion, not as a receipt after every action.
  • Use operational waits only when the next action needs synchronisation.
  • Never mention selectors, DOM paths, framework-generated IDs, coordinates, or internal TestZeus operations.

How this guide is organised

Page What it covers
Feature-file grammar Given/When/Then structure, variables, cross-testcase handoffs, runtime-unique data
The component interaction contract The five stages every control goes through, and the verb that matches each component
Text-entry components Text fields, textareas, rich text, numeric and currency fields, search, autocomplete
Selection, state, and date components Picklists, comboboxes, checkboxes, radio groups, switches, dates and times
Navigation and overlays Buttons, menus, tabs, wizards, modals, drawers, toasts, tabs, iframes
Collections, files, and forms Tables, grids, uploads, downloads, charts, sliders, drag and drop, form composition
Loops and conditionals The three loop forms, safety boundaries, IF/ELSE flows, API and SQL examples
Platform rules Salesforce, OmniStudio, nCino, ServiceNow, SAP, Oracle, general web, mobile
Completion rules and checklists When an interaction counts as complete, forbidden wording, the final author checklist

The Casebook applies this standard to 100 concrete cases. Use this guide to understand the rule; use the casebook to copy the shape.