I use Katalon Studio for my test automation. It comes with an in-built script editor (Groovy).

So, I can use Groovy's power assert that gives me a nice and detailed output message when the assert fails.

However, some other non-technical (or less-technical) staff would like to run automated tests themselves. And their problem is they are unable to correctly interpret the fail message.

I know I can use assert expression1 : expression2 for printing the custom message, but I really prefer the power assert output.

Is there a way to have both custom message and power assert message?


1 Answer 1


This was answered here. In short:

It is possible to add the message as a String to an assertion:

assert "a custom message" && expression

Since a non-empty String is truthy in Groovy, the assertion will only fail –and produce output– if the expression is falsey + you'll get power assertion output from it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.