In QTP, I often report back to the log whenever critical parts of a test either pass or fail. I use the method: Reporter.ReportEvent micPass, "Critical Area of Test", "Things went better than expected"
I would like to detect whether there have been any errors logged to the report by the time I finish the test. The errors I'm looking at aren't anything like Err.Raise InvalidCall
; an error would just be anytime I call micFail
. By knowing if (and where) a micFail has been called in the test, I could then have a custom function automatically write the results to different areas.
Is it possible to create a function that looks in the default reports to see if the test failed, and if so, which area?