Among other things, 'Scenario Cleanup' allows the test process to log any information about an error that might have occured during the course of the scenario. Perhaps you might want to copy relevant files or error messages to logfiles another directory. You might also want to take a screendump at the time the error has occured and save that in a file with a unique name. Then
you can close the software you're testing and do whatever cleanup you want.
Here is what you might want the scenario in a test case to look like:
If you are not using any customized error or logging routines, and your test case leaves the appliction under test in a condition to continue, then their is nothing wrong with omitting the Scenario Cleanup step. VT will still catch any exceptions that have caused the scenario to fail and display them in the viewport at the conclusion. The problem is the error will be very generic in that it will only report that the test case failed at line xx and the error was trapped at line xx in the code. With experience you will find that test execution may actually have failed long before the points indicated by VT and without custom error handlers/logging, you may find it difficult to hunt down the actual cause of the fault.
ya i hav already faced this problem" problem occurs much before the line where the view port shows an error" .it was when i was doing the evaluation of VT in my company.i dint knew that to avoid this we gota use log files. but i use u fine out the errors, without logging only. that use to be a tedious job.
Thanks n Regards