Forum Discussion
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.
My test generates an id for few activities and those id's will be part of response. We randomly pick some of these ids from passed test case and use those for manual test flow (as the process of generating id, is lengthy and consumes more time while doing manually from UI) and it is difficult to track which id is related to a passed testcase.
- gpavanptesting6 years agoNew Contributor
Hi gid_216 nmrao I'm also in need of solution. Please can you help? I have searched a lot but didn't find an solution. Thanks in advance!!
- groovyguy6 years agoCommunity Hero
gpavanptesting you're replying to a thread that's over two years old. You may want to consider starting a new thread with your particular details instead of digging these ones out of the past. :)
Related Content
- 2 years ago
Recent Discussions
- 22 days ago