Reports an event to the test results.
Reporter.ReportEvent EventStatus, ReportStepName, Details [, ImageFilePath]
The following examples use the ReportEvent method to report a failed step.
Reporter.ReportEvent 1, "Custom Step", "The user-defined step failed."
Reporter.ReportEvent micFail, "Custom Step", "The user-defined step failed."
The following example uses the ReportEvent method to include a captured bitmap in the test results.
Reporter.ReportEvent micDone, "Display Logo", "This is my logo", "MyLogo.bmp"
Retrieves or sets the current mode for displaying events in the Test Results. You can use this property to completely disable or enable reporting of steps following the statement, or you can indicate that you only want subsequent failed or failed and warning steps to be included in the report.
To retrieve the mode setting:
CurrentMode = Reporter.Filter
To set the mode:
Reporter.Filter = NewMode
The mode can be one of the following values:
The following example uses the Filter property to report the following events in the Test Results: 1, 2, 5, and 6.
Reporter.ReportEvent micGeneral, "1", ""
Reporter.ReportEvent micGeneral, "2", ""
Reporter.Filter = rfDisableAll
Reporter.ReportEvent micGeneral, "3", ""
Reporter.ReportEvent micGeneral, "4", ""
Reporter.Filter = rfEnableAll
Reporter.ReportEvent micGeneral, "5", ""
Reporter.ReportEvent micGeneral, "6", ""
The following example uses the ReportPath property to retrieve the folder in which the results are stored and displays the folder in a message box.
Path = Reporter.ReportPath
The following example uses the RunStatus property to retrieve the status of the run session at a specific point and exit the action if the test status is fail. If the test status is not fail, the test run continues.
If Reporter.RunStatus = micFail Then ExitAction