Why isn't the top TEST STEP Fail? [+Suggestion] Add PassOnly and FailOnly View in the Test Report

Hello Everyone, Nice Weekend

top Pic Reference

I write Custom Failure Script And Successful Exceution and receive Report

My Code is Normally generated Failed

but parent TEST STEP is PASSED

Direction Q,

Why not Generated from custom failure parents TEST STEP?

+ Suggention

Katalon Studio Basic Test Report is only supply ‘Expand ALL’ Button
I want OnlyPassViewExpandALL and OnlyFailViewExpandALL Button

Currently I have modified HTML documents
so that I can only view FAIL,
but it’s inconvenient that I modify HTML documents every time.

Plz Support to OnlyFailButton and OnlyPassButton
(Katalon Studio Setting inner Report option Pass and Fail CheckBox exist I Know,
but result All contain but view User Select)

Thx u for reading long Post

777.PNG

anybody need help me! :slight_smile:

anybody need help me!

You need to add functions to generate test step’s status for you, it does not generate status automatically if you don’t use built-in keywords.

For the solution, you can refer some sample code below:

import com.kms.katalon.core.util.KeywordUtil
@Keyword
def isElementPresent(TestObject to, int timeout){
//Use Katalon built-in function to find elements with time out 1 seconds
List<WebElement> elements = WebUiBuiltInKeywords.findWebElements(to, timeout)
if (elements.size() > 0)
{
   KeywordUtil.markPassed("Element is Present")
}
else
{
   KeywordUtil.markFailed("Element is not presebt")
}
	}
1 Like

Hello @Vinh Nguyen Thx u for answer

that means, custom failur mark after, execute searching TO method menual fail generate?
Hum… I will try

KeywordUtil.markPassed("Element is Present")  <-- this method not generate Pass or FailI already used itMy Project use this method com.kms.katalon.core.logging.KeywordLogger.logFailed("something another String")this method generated FAILED same reportbut parent STEP not FAILED

i tried that method
In the old days
It was not marked as a defect, but it is now well.
Thank you.