Unable count failures if i create log failed

i have made condition in my script test

ex :

if (a+b){
WebUI.click(object)…

} else {

ErrorMsgFailed.logFailed(“======Wrong Error Handling=====”)

}

i have run it and it still pass even though the execution run in error message

image.png

Joko T. Susilo Widodo said:

i have made condition in my script test

ex :

if (a+b){
WebUI.click(object)…

} else {

ErrorMsgFailed.logFailed(“======Wrong Error Handling=====”)

}

i have run it and it still pass even though the execution run in error message

Hi Joko,

If you use that logFailed, it will just only mark that message to have failed status, but the overall status of current executed test case will not be affected just for your information.

If you wish to make a change to current test case’s status, then you should use this:

KeywordUtil.markFailed(“”)

Vinh Nguyen said:

Joko T. Susilo Widodo said:

i have made condition in my script test

ex :

if (a+b){
WebUI.click(object)…

} else {

ErrorMsgFailed.logFailed(“======Wrong Error Handling=====”)

}

i have run it and it still pass even though the execution run in error message

Hi Joko,

If you use that logFailed, it will just only mark that message to have failed status, but the overall status of current executed test case will not be affected just for your information.

If you wish to make a change to current test case’s status, then you should use this:

KeywordUtil.markFailed(“”)

Well thanks for your response,

am i need to import something to use it?

thanks and regards,
Joko T. Susilo Widodo