How to mark a test case as passe regardless of the test steps failures

I am facing a pretty “small” problem (at least I thought so): I want to change the result of a test case regardless of how many test steps have failed in that test case. I can easily do the opposite with **



but I am yet to find a way to mark a test as passed and I did try


That dont solve my issue when there are steps that failed before

1 Like

Hi @mamourwane, Read this post: Configure failure handling settings in Katalon Studio | Katalon Docs

Hello @Dave_Evers thank you for your answer I am aware of these option, using these I would have to this for every single steps of my test cases. What am trying to achieve is to have an test case with two different condition of success one would be if no steps failed and the condition is verified → test passed and the second would be if the condition is verified the test is passed. If I set them all at optional It would solve my problem but create a new one.

@mamourwane It is hard to tell what the best solution for your question is without knowing more information. If there aren’t many steps that could fail you could put it into a try/catch block where the steps that might fail are in the try block and then the catch would have the conditional to check.

i hope this will help you

1.assert True
2. adding failure Handlig to the test step to make it pass
for Eg:

	WebUI.verifyNotMatch('2', '1', false, FailureHandling.OPTIONAL)
	WebUI.verifyNotMatch('2', '1', false, FailureHandling.CONTINUE_ON_FAILURE)

1 Like

@mamourwane - as suggested by @bharathi.a is correct way
just you need to put
WebUI.verifyMatch(actual, expected, true, FailureHandling.OPTIONAL) where ever you are using verifymatch
if you want to pass test cases then Do not use FailureHandling.STOP_ON_FAILURE, FailureHandling.CONTINUE_ON_FAILURE in test steps.

1 Like

If you want to make a direct match between the actual text and the expected text, then you should set the boolean to false in the above statement, not true. Setting the boolean to true sets the match to using Regular Expression (RegEx). Then you need to know what are the components that make up RegEx (wild cards, ignore spaces, ignore letter cases, etc.).

WebUI.verifyMatch(actual, expected, false, FailureHandling.OPTIONAL)

Sample using true instead of false like in the below link:

this is a kind of example not exact copy paste solution