Skip to main content

Text Asserters

You can globally set how to assert responses using the SCRIPTING_MATCHING_MODE capability. Text Asserters allow you to extend or override this behavior for each response. The matching modes include wildcard, regexp, include, and exact match.

You can decide to use more arguments with AND (…_ALL…) or OR (…_ANY…). Exact match supports only OR, so the postfix is not allowed there. Each asserter can work case insensitively (optional _IC prefix).

Text (is any matching)

Checks if any part of the response matches the expected text.

Example: This will pass if the bot responds with "Hi" or "Hey".

Example Botium Script

My Convo

#me
hello

#bot
hello
TEXT_CONTAINS_ANY Hi|Hey

Text (is any matching - case ignored)

Performs the same check as Text (is any matching) but ignores case sensitivity.

Example: This will pass if the bot responds with "hi" or "hey" in any case.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_CONTAINS_ANY_IC hi|hey

Text (are all matching)

Checks if all specified parts of the response match exactly.

Example: Both parts must be present in the response for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_CONTAINS_ALL My name is Bot|I am called Bot

Text (are all matching - case ignored)

Performs the same check as Text (are all matching) but ignores case sensitivity.

Example: Both parts must be present in the response in any case for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_CONTAINS_ALL_IC my name is bot|i am called bot

Text (is any exact matching)

Checks for an exact match with any of the specified texts.

Example: The bot response must be exactly "4" or "four".



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_EQUALS 4|four

Text (is any exact matching - case ignored)

Performs the same check as Text (is any exact matching) but ignores case sensitivity.

Example: The bot response must be exactly "4" or "FOUR" in any case.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_EQUALS_IC 4|FOUR

Text (is any wildcard matching)

Allows for wildcard matching in the response.

Example: The bot response must contain the word "interesting" at any position.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARD_ANY interesting

Text (is any wildcard matching - case ignored)

Performs the same check as Text (is any wildcard matching) but ignores case sensitivity.

Example: The bot response must contain the word "INTERESTING" at any position in any case.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARD_ANY_IC INTERESTING

Text (are all wildcard matching)

Checks if all specified wildcard patterns match the response.

Example: Both wildcard patterns must be present in the response for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARD_ALL feature1|feature2

Text (are all wildcard matching - case ignored)

Performs the same check as Text (are all wildcard matching) but ignores case sensitivity.

Example: Both wildcard patterns must be present in the response in any case for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARD_ALL_IC FEATURE1|FEATURE2

Text (is any wildcard exactly matching)

Checks for an exact match using wildcard patterns.

Example: The bot response must exactly match the wildcard pattern.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARDEXACT_ANY id*123

Text (is any wildcard exactly matching - case ignored)

Performs the same check as Text (is any wildcard exactly matching) but ignores case sensitivity.

Example: The bot response must exactly match the wildcard pattern in any case.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARDEXACT_ANY_IC ID*123

Text (are all wildcards exactly matching)

Checks if all specified wildcard patterns match the response exactly.

Example: Both wildcard patterns must match the response exactly for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARDEXACT_ALL ID*123|ID*456

Text (are all wildcards exactly matching - case ignored)

Performs the same check as Text (are all wildcards exactly matching) but ignores case sensitivity.

Example: Both wildcard patterns must match the response exactly in any case for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_WILDCARDEXACT_ALL_IC ID*123|ID*456

Text (is any regexp matching)

Allows for regular expression matching in the response.

Example: The bot response must match the regular expression pattern.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_REGEXP_ANY \\d+

Text (is any regexp matching - case ignored)

Performs the same check as Text (is any regexp matching) but ignores case sensitivity.

Example: The bot response must match the regular expression pattern in any case.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_REGEXP_ANY_IC \\d+

Text (are all regexp matching)

Checks if all specified regular expression patterns match the response.

Example: Both regular expression patterns must match the response for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_REGEXP_ALL \\d{3}|\\d{5}

Text (are all regexp matching - case ignored)

Performs the same check as Text (are all regexp matching) but ignores case sensitivity.

Example: Both regular expression patterns must match the response in any case for this to pass.



Example Botium Script
My Convo

#me
hello

#bot
hello
TEXT_REGEXP_ALL_IC \\d{3}|\\d{5}

Was this article helpful?

0 out of 0 found this helpful