Designing for automation
The best Cress experience comes from designing applications with stable, intentional automation contracts.
Web applications
Preferred locator order:
testIdrole+labelrolelabeltextcssSelectorxpath
Recommendations:
- add
data-testidattributes to important workflow surfaces - keep labels and accessibility roles consistent
- make login, setup, and seed-data paths deterministic
- expose test accounts or reusable fixtures
Desktop applications
Preferred locator order:
automationIdname+controlTypelabelrole
Recommendations:
- assign
AutomationIdvalues deliberately and keep them stable - avoid unnecessary window-title variance
- provide launch arguments or test modes for repeatable startup
- expose observable states instead of timing-based assumptions
Flow design
Healthy flows are:
- small enough to diagnose quickly
- traceable back to capabilities and acceptance criteria
- portable across local and CI profiles
- evidence-rich enough to explain failures
Team onboarding checklist
Before onboarding a system to Cress, confirm:
- the app exposes stable locators
- the environment can be expressed through profiles
- test data can be reset or recreated
- the critical user journey can be expressed as a small set of flows
- evidence artifacts are enough to triage failures asynchronously