Forum Discussion
nmrao
8 years agoCommunity Hero
Here you go:
def isTestPass = false
assert isTestPass, "The value of isTestPass variable is ${isTestPass}"
EDIT:
I was under impression that how to log the failure message to Test Report. Hence the above example is show.
After posting the above example, it is realized that you want the way.
My question to is this - why do you need a reason saying assertion passed in the passed test? The entire test is passed already i.e., assertions are passed, why would some be interested in their time here? Instead focus time on failures.
If you do not mind, may I ask you what is your use case. Facing this kind of topic for the very first time from ever since I participate in the forum.