How do we collect functional coverage on passing test?

All coverage tools collect coverage on passing test and ignore it on failing test.

If I do not use coverage tool, How do I prevent SV simulator from collecting coverage on fail test?

In reply to superUVM:

It’s not clear what your question is. Each test that is run will generate coverage information, regardless if the test passes or fails. It is up to the you to determine what to do with that coverage information.

Post-processing of coverage information by a coverage tool is critical as it allows you to merge all the various coverage information into one database so you can determine where you are in the verification process. Including/excluding coverage information based upon pass/fail criteria is one part of this process.

How do you expect to determine your overall coverage without a coverage tool?