How to set the status of test case in if branch

if (textofme.contains(usernameandmail_verify)) {

Testcase failed

}

i want to excute the command to set the testcase failed, are there any solution,
please help

there are two commands you can use:

public static void markFailed(String message)

Mark a keyword to be failed and continue execution

Parameters:

message - fail message

and

public static void markFailedAndStop(String message)

Mark a keyword to be failed and stop execution

Parameters:

message - fail message

similar to those are Error commands:

public static void markError(String message)

public static void markErrorAndStop(String message)