Test components in custom UI pages.

Before you begin

Procedure

  1. Navigate to All > Automated Test Framework > Tests.
  2. Click New.
  3. Enter a name and description for your test.
  4. Click Save.
  5. In the Test Steps related list, click Add Test Step.
  6. Add test steps to navigate to the target custom UI page.
    Use the Navigate to Module step to open a page that has an application navigator module. Use the Open Service Portal Page step to open a portal page.
    To open a UI page, use these test steps:
    1. Open an Existing Record: Open the record for the page.
    2. Click UI Action: Click the Try It UI action to open the page.
  7. Add test steps from the Custom UI category to validate the behavior of custom UI components.
    For a list of available Custom UI test steps, see Custom UI category.
  8. Retrieve UI components when adding a test step.

    Identify the testable page components on a custom UI page by retrieving a list of UI components for test steps. You can collect the components of the current page by selecting Retrieve Components.

    The system retrieves the components using an existing or a new client test runner. Ensure that the client test runner tabs used in the retrieval process are running in the foreground. For tests that don’t yield any components after selecting Retrieve Components, the following warning message is displayed and the Next button is disabled.
    Warning messages for test steps with no components
    If you have already retrieved a list of page components, click Next to use the previously retrieved list. You can also click Retrieve Components to rerun the current steps and refresh the list of testable page components. If the test fails while retrieving components, the following warning notification is displayed. You can review the test results by clicking the link in the notification.
    Retrieve page components failure
    Note: If you need to update a step in a test, click Retrieve Components for that step and the test runs only up to that particular step. The steps beyond the selected step don’t run. The test passes if all the updated steps pass without failure.
    Image showing the skipped steps after retrieve components

    Automated Test Framework stores the list of page components and displays the list in the Component values or Component field on the test step form. The field displays this information about each component:

    If you create a parameterized test that includes Custom UI test steps, the system only uses the first data set to retrieve components.

What to do next

Consider adding tests to a test suite. For more information, see Building and running automated test suites.