Skip to main content
LinkedIn
Copied!

Table of Contents

Tools for testing the UI

Version:

Only available versions of this content are shown in the dropdown
Applicable to Cosmos React and Theme Cosmos applications

Testing the user interface at the development stage helps you ensure that your application works as expected. Pega Platform includes tools for setting up end-to-end scenario tests, as well as a Selenium-based starter kit for CRM.

Pega Platform includes the following testing tools:

Scenario tests
Tests that verify that the end-to-end scenarios are functioning correctly. For more information, see UI testing.
Selenium
A test framework and sample UI tests that you can use to build up a test automation suite for your application. For more information, see Selenium starter kit.
Test ID
An ID that provides a unique identifier for automated testing.

In the property pane of a UI component, you can either enter a custom ID, or generate a unique 21-digit time stamp to act as a Test ID. The system adds the Test ID as a data-test-id attribute on the Document Object Model (DOM) element at run time.

Generating a random Test ID
The Generate button is located in the Identifiers node of a
                                        property pane.

You can use the Test ID in automated tests to single out a component. The following code snippet presents a sample use in an XPath selector that returns the element with a matching data-test-id.

$x("//*[@data-test-id='202105250826190065001']")
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us