Build End-to-End Tests Fast with the UTAM Chrome Extension

— by

Build end-to-end tests fast with two elements that make UTAM great: the base page objects (PO) and the UTAM Chrome extension …

Here are highlights from article Build End-to-End Tests Fast with the UTAM Chrome Extension

1. Overview of UTAM:
– UTAM is an open-source solution by Salesforce for designing end-to-end (E2E) tests on any app.
– It decouples test code from the DOM using page objects (PO) written in JSON.
– POs can refer to specific DOM elements and other POs, and are compiled into JavaScript, TypeScript, or Java objects.
– The decoupling allows for easier maintenance when the DOM changes.

2. UTAM base page objects:
– Salesforce provides a set of base page objects that cover Lightning Experience.
– As of Winter ’24 release, there are 727 base page objects available on the Maven Central Repository and NPM.
– Base POs represent internal components of Lightning Experience, from low-level to top-level components.
– They provide ready-to-use building blocks for implementing E2E tests and save developers from manually inspecting the DOM.
– Base POs are maintained by Salesforce, so developers don’t have to update them when there are DOM changes.

3. Benefits of base POs:
– Reuse: Base POs serve as building blocks for implementing E2E tests.
– Maintenance: Salesforce updates base POs when there are DOM changes, eliminating the need for developers to update PO definitions.

4. UTAM Chrome extension:
– The UTAM Chrome extension helps developers navigate the complexity of the pages being tested.
– It allows developers to import the base PO package and their own custom POs.
– The extension helps identify the root PO for the current page and allows drilling down into the PO list to access specific parts of the page.

5. Streamlining E2E testing with UTAM:
– UTAM’s decoupling of test code from the DOM and the availability of base POs simplifies E2E test implementation and maintenance.
– The UTAM Chrome extension further enhances the testing process by providing visual guidance and easy navigation between page objects.

You can read it here: https://sfdc.blog/BTtYT

Source from developer(dot)salesforce(dot)com

Newsletter

My latest updates in your e-mail.