How to force testcaseStatus to PASS

we can get current testcase status by testCaseContext.getTestCaseStatus(),
but I need to force a testcase to PASS even it failed in some steps, how to do it?
i.e. is there a way to setTestCaseStatus() ?

Interesting because this OP is wanting a failure to stop

So, personally, don’t use the FailureHandling.STOP_ON_FAILURE as a parameter on any of your statements and if the test runs to the end, even with warnings, the TC should pass. You should also look at your default KS setting for FailureHandling: