Skip to main content

Dynamic test objects in TrueTest

Understand dynamic test objects

Dynamic test objects are elements in your application that can change based on user interaction. Dynamic objects do not have a fixed attribute, and they may change each time they appear on the screen, depending on the context or user actions.

When TrueTest detects dynamic elements, it generates a single, generalized test object that encapsulates these variations. With this, you can add variables to the dynamic object to include properties that are relevant to the AUT. This variable represents the changing aspect of the object.

For example, consider featured products on an E-commerce website home page. Each link has unique attributes such as product_name and a distinct href pointing to different product IDs. Despite these differences, they are fundamentally product links. TrueTest (1) recognizes UI elements of this dynamic nature, (2) generates a feature_product_link object, which you can (3) add specific variables such as "product ID" to it.

This approach ensures that your tests remain accurate even when elements change dynamically, and improves your effort in managing test objects.

Key features of TrueTest dynamic objects
  • Groups together elements with different attributes but the same function.
  • Users can define variable attributes specific to the test environment.
  • Generates a unified test case for elements that perform the same action, reducing the need for multiple similar test cases.

Work with dynamic test objects in Katalon Studio

To view dynamic object generated by TrueTest, in the Tests Explorer panel, go to Object Repository > AI-Generated and expand the Dynamic Objects folder.

View dynamic objects folder

A dynamic test object can be identified using the four supported locator methods: XPath, Attributes, CSS, and Smart Locator. The dynamic properties of the object are configured with variables.

When you use dynamic test objects in a test case, the values for these variables are assigned to specific variables within the test script. TrueTest provides default values for the variables, but you can replace the default values with other environment-specific values.

Was this page helpful?