Add verification to test steps
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.
- 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​
- In Katalon True Platform, go to Tests > Journey Maps.
- Open the desired journey map.
- Click View test steps to open the selected flow in Session Replay view.
- Hover over the step where you want to add a verification, then click the Add (+) icon.
- Select Add verification.
- In Session Replay, click the target element you want to verify.
A verification panel appears with the captured element details, including available locators.
- In Test object name, enter a name for the element.
- In Verification type, select the verification you want to add.
- Click Add verification.
- 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.
If the flow already has a linked generated test case, saving the verification change marks that test case as out of sync. Re-generate the test case from the flow to update its generated script. TrueTest keeps the same linked test case and repository location.
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
Verify element has textVerify element has text accepts a value. You can use either:
- A fixed text value, such as
Order confirmed. - A variable in the
@variableformat, 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. If matching flows have linked generated test cases, confirm that you want to include them. TrueTest marks the affected linked test cases as out of sync until you re-generate them.
If you do not confirm, TrueTest applies the verification only to matching flows without generated 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.
Delete a saved verification​
- Open the flow in Session Replay view.
- Select the step that contains the saved verification.
- Open the verification, then select the delete action.
- To restore the verification before saving, undo or discard the deletion.
- Click Save changes to delete the verification.
If the flow has a linked generated test case, re-generate the test case after saving. TrueTest updates the same linked test case to remove the TrueTest-managed verification from its generated script.
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
- In Katalon True Platform, go to Tests > Journey Maps.
- Open the desired journey map.
- Click View test steps to open the selected flow in Session Replay view.
- Hover over the step where you want to add a custom script, then click the Add (+) icon.
- Select Invoke custom script (Groovy).
- Enter a Name for your script, for example,
verifyCartItem. - 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)
- Optional: Select Apply to similar flows in the current map to apply the custom script to other matching flows within the same journey map. If matching flows have linked generated test cases, confirm whether to include them.
- 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.
- Re-generating an out-of-sync linked test case overwrites its generated script. Review the generated changes before using the updated script in your test project.
- 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.