Skip to main content

Add verification to test steps

Last updated: June 2026

Built-in verifications allow you to validate common element states directly on a specific step in a journey map. You can use them to confirm whether an element is present, visible, clickable, checked, or contains the expected text without writing a custom Groovy script.

This guide explains how to add, save, reuse, and manage built-in verifications in TrueTest.

How it works
  • You add a verification by selecting an element directly in Session Replay.
  • The verification is first added as an unsaved change. You must save the flow changes before leaving the flow or generating the test case.
  • Verify element has text supports static text and dynamic variables.
  • Test object names are required.
  • In common functions, Apply to similar flows in the current map is automatically enabled.

Add a verification to a test step​

  1. In Katalon True Platform, go to Tests > Journey Maps.
  2. Open the desired journey map.
  3. Click View test steps to open the selected flow in Session Replay view.
  4. Hover over the step where you want to add a verification, then click the Add (+) icon.
  5. Select Add verification.
  6. In Session Replay, click the target element you want to verify.

    A verification panel appears with the captured element details, including available locators.

  7. In Test object name, enter a name for the element.
  8. In Verification type, select the verification you want to add.
  9. Click Add verification.
  10. Click Save changes to persist the verification.

    If you add, edit, or delete a verification, TrueTest treats the change as unsaved until you save the flow.

After saving, TrueTest can apply reusable verifications to other matching flows in the same journey map.

Supported verification types include:

  • Verify element present
  • Verify element not present
  • Verify element visible
  • Verify element not visible
  • Verify element clickable
  • Verify element not clickable
  • Verify element checked
  • Verify element not checked
  • Verify element has text
Expected values for Verify element has text

Verify element has text accepts a value. You can use either:

  • A fixed text value, such as Order confirmed.
  • A variable in the @variable format, such as @email.

Use variables when the expected value changes between executions but is still available in the generated test context.

Reuse verifications across similar flows​

When Apply to similar flows in the current map is selected, TrueTest applies the verification to other matching flows in the same journey map that do not already have test cases.

You can also carry over reusable verifications when generating a new journey map.

The carry-over option is enabled by default. When selected, TrueTest reuses applicable verifications from previously generated maps to help maintain consistency and reduce manual work.

Invoke custom script​

Use Invoke custom script (Groovy) when built-in verifications are not enough, for example when you need:

  • Complex conditional validation
  • Multi-step validation logic
  • Shared reusable helper methods
  • Validation against values that are not covered by the built-in verification types
  1. In Katalon True Platform, go to Tests > Journey Maps.
  2. Open the desired journey map.
  3. Click View test steps to open the selected flow in Session Replay view.
  4. Hover over the step where you want to add a custom script, then click the Add (+) icon.
  5. Select Invoke custom script (Groovy).
  6. Enter a Name for your script, for example, verifyCartItem.
  7. In the Imports and Custom Script fields, enter the script logic, for example:
import truetest.Toolshop.custom.CartAssertions as CartAssertions
--
CartAssertions.verifyCartItemCountFromText(findTestObject('AI-Generated/Toolshop/Page_checkout/label_cartItemCount'), 1)
  1. Optional: Select Apply to similar flows in the current map to apply the custom script to other matching flows that do not already have test cases within the same journey map.
  2. Click Save changes to save the custom script verification.

    The custom script verification is successfully added to the selected step in the journey map.

Limitations and notes​

  • Built-in verifications are added from Session Replay only. You cannot create them by manually typing locators without selecting an element in the replay.
  • The verification option is available only when Session Replay is ready for the selected flow.
  • Test object names are required and should use letters, numbers, and spaces only.
  • In common functions, reusable application to similar flows is automatically enabled.
  • Unsaved verification changes must be resolved before you leave the flow or generate the test case.
  • A backend-only assertion type exists for attribute value, but it is not exposed in the current UI and is not currently supported as a user-facing verification option.
Was this page helpful?