You are here:
Automated Testing with UTAM for Omnistudio
Omnistudio now supports automated UI testing for Omniscripts and Flexcards by using the UI Test Automation Model (UTAM) framework. Automated testing is crucial for ensuring the stability and integrity of Omnistudio deployments.
UTAM is a modern, open-source framework that helps you validate the entire customer experience. It validates by simulating UI interaction to test user actions (example, clicks, input), asserting correct element values, verifying expected navigation behaviors (example, moving between steps), and confirming accurate visual states (example, error messages, visibility). This test ensures customer journeys function correctly after deployments or code changes.
UTAM uses the Page Object Model (POM) pattern to abstract away underlying UI changes, creating stable, resilient tests that remain durable across Salesforce releases. This approach provides reliable, end-to-end validation of the customer experience. See UTAM and Salesforce Page Objects.
Benefits of UTAM Testing
UTAM testing provides several key advantages for quality and stability:
- Durable and reliable UI testing: Your tests remain stable and reliable even when platform updates change the component structure. UTAM achieves this durability through Document Object Model (DOM) abstraction by separating the test logic from the UI code.
- Comprehensive user-journey validation: Tests Omniscripts and Flexcards end-to-end by simulating real user actions (form entries, button clicks, data checks, and conditional steps) and navigation.
- Reusable and maintainable tests: Uses the Page Object Model (POM) to organize UI test code into reusable Page Objects (POs), making tests easier to read, build, and maintain.
Key UTAM Testing Concepts
These concepts explain the underlying architecture that ensures your tests remain stable during any Salesforce UI changes:
- Page Object Model (POM): POM is the main design pattern that UTAM uses. It separates the test logic (what you test) from the UI structure (where the element is present in the code).
- Abstraction and resilience: UTAM achieves test stability by abstracting the underlying DOM structure. Even if Salesforce modifies the HTML or CSS of an Omniscript or a Flexcard element, your test script remains stable and functions as expected.
- Page Objects (POs): POs are the central modules that represent specific UI components,
such as an
OmniscriptStepor an input field. The developer calls the stable methods defined in the POs . For example,setValue(),click(). - Test Scripting: The developer writes code that calls the PO methods in a sequence, followed by an assertion to verify the outcomes. For example, verifying field values or error messages.
- UTAM Testing Workflow
The UI Test Automation Model (UTAM) testing workflow focuses on preparing the testing environment, writing UTAM Page Objects (POs), and running end-to-end tests for UI components. - How to Write End-to-End Tests with UTAM for Flexcards
To fully automate and stabilize your guided user flows, structure and build end-to-end tests for Flexcards by using UTAM's commands. - How to Write End-to-End Tests with UTAM for Omniscripts
To fully automate and stabilize your guided user flows, structure and build end-to-end tests for Omniscripts by using UTAM's commands.

