Re: Report do not contain error informa. Only the log before the error occurs using the Log.SaveResu
What you have described is correct behavior. Basically, the OnLogError event handler interrupts that act of logging the error. The error is not written to the log until the event handler exits. This is to allow the event handler to make any necessary modifciations to the error (or skip it entirely) before it is written to the log.
Rather than the SaveResultsAs going into that event handler, I'd actually put it in the OnStopTest event handler.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.
I have several tests within a Project. Each test stops at the first error that occurs, but the Project is not set to "stop on error". I could test the feature A, B and C of my application in respectively the test A, B and C.
I add a last test item in which I only prepare my mail, prepare my log with the scope of the whole project.
If A and C go OK and B goes not OK, I'll have 4 test items in my log : A, B, C and the last test item in which I write the log and send my mail.
Every item is loggued entirely (until any eventual error, of course).
Mind the call stack of the last item in error in the report to see everything.