If error comes then test will displayed as pass

In reply to karthy_raj:

There are a couple of ways to do this. It’s best if your error message has a unique ID to be selected.

You can use uvm_report_severity_override to demote your error to a warning and then use get_id_count to make sure the count is nonzero.

You can use uvm_report_catcher to demote your error, and also set a status bit that your scoreboard will look for to make sure it has been set. If your message does not have a unique ID, you would have to use this to parse the message.