Skip to content

Home / UI Guide / Constraints Tab

Constraints Tab

Constraints define rules about which parameter combinations are valid or invalid. For example, Safari only runs on macOS, so you would constrain those values together.

Constraint Editor

Constraints are written in PICT's native text syntax. This gives you access to the full constraint language without limitations.

IntelliSense

The editor provides autocomplete to help you write constraints:

  • Ctrl+[ — Suggests parameter names (after typing [)
  • Ctrl+" — Suggests values for the most recently referenced parameter

Insert Template

The dropdown provides common constraint patterns you can insert and customize:

  • IF [param] = "value" THEN [param] = "value";
  • IF [param] IN {"v1", "v2"} THEN [param] = "value";
  • IF [param] = "value" THEN [param] = "value" ELSE [param] = "value";
  • [param] <> [param]; (unconditional invariant)

Syntax Quick Reference

A collapsible reference panel shows the constraint grammar:

Element Syntax
Conditional IF predicate THEN predicate [ELSE predicate];
Invariant predicate;
Relations =, <>, >, >=, <, <=, LIKE, IN
Logical AND, OR, NOT, ()
Values "string" or number
Parameters [ParameterName]
Sets IN { "val1", "val2", "val3" }
Wildcards LIKE "FAT*" (* = any chars, ? = one char)

For the complete constraint language reference, see Concepts: Constraints. For how ProTest validates your constraints in real time (including numeric vs string value rules), see Validation.

Example

IF [OS] = "Linux" THEN [Browser] <> "Safari";
IF [OS] = "macOS" THEN [Browser] <> "Edge";
IF [RAM] = "4GB" THEN [Browser] <> "Chrome" OR [OS] <> "Windows";