How to get the reason for failure of a test case ?


#1

I want to update a field in Jira based upon the reason of failure of a test case. How can I access this information in a custom keyword? The status can be obtained from testCaseContext.getTestCaseStatus() but I require TestCaseFailureMessage.


#2

The topic is moved to New Feature/Suggestion for further discussion.


#3

+1 for this.


#4

This feature request has been acknowledged and logged to Github: https://github.com/katalon-studio/katalon-studio/issues/14.
Please follow up its status there.


#5

Dung,

Please ensure this proposal is approached in a way that encompasses the entire logging mechanism. As you will recall, for this same reason, I rewrote how logging and reporting works for my test harnesses since the required hooks were not available (this proposed API/hook included).


#6

Thanks for your suggestion, Russ.
Anyway, in the scope of this request, we have added the failure message and stack trace into the test case context since Katalon Studio 5.9.
Dharmesh, can you help check the new version out to see if it works for you.

Regards,


#7

+1


#8

How exactly can I get the failure message?
textCaseContext is not listed on api-docs.katalon.com.