Skip to main content

[LLM] Assert Text

Last updated: August 2026
Prerequisites

This keyword is available from Katalon Studio version 11.5.0+.

Enable an AI service for your account and select a provider in Katalon AI Assistant Preferences.

Description​

Send a text value to the configured AI service and assert that it meets a nonblank plain-language expectation. This is an AI judgment rather than a deterministic string comparison. Ambiguous or partial matches are judged as failures.

Keyword name: assertText

The step fails when the AI returns a valid FAIL verdict. A null value, blank expectation, unavailable AI service, or malformed verdict causes an execution error. Both failures and errors follow the configured failure handling.

Parameters​

ParameterParameter TypeRequiredDescription
valueStringYesSpecifies the non-null text to evaluate.
expectationStringYesSpecifies the nonblank expectation that the text must meet, in plain language.
flowControlFailureHandlingNoSpecifies the failure handling behavior. When omitted, the keyword uses the configured default failure handling.

Examples​

LLM.assertText('Order completed successfully.',
'The message confirms that the order was completed.')

LLM.assertText('Order status is pending.',
'The message confirms that the order was completed.',
FailureHandling.CONTINUE_ON_FAILURE)
Was this page helpful?