How to generate the results report if pass/fail or any bug occurs

How to generate the results report if pass/fail or any bug occurs.

Have you used the ReFramework? This is exactly what it intends to achieve. Depending on the success/failure of a case you can report this in the Finally section of the Process Transaction State.