---
description: This HP QTP tutorial demonstrates the use of the function Reporter.ReportEvent and Results Formatting with syntax and examples for better understanding.
title: Reporter.ReportEvent in UFT/QTP with Example
image: https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png
---

[Skip to content](#main)

**⚡ Smart Summary**

Reporter.ReportEvent in UFT/QTP sends custom pass, fail, warning, and informational messages straight into the Run Results Viewer using the micPass, micFail, micDone, and micWarning status constants, giving testers a readable, step-by-step record of what an automated script actually did.

- 🎯 **Definition:** Reporter.ReportEvent writes a custom status and message into the UFT Results tree, independent of built-in checkpoints.
- 🧩 **Syntax:** The method takes EventStatus, ReportStepName, Details, and an optional ImageFilePath, in that order.
- 🚦 **Status constants:** micPass, micFail, micDone, and micWarning each set the step color and whether the run status changes.
- 🖼️ **Screenshots:** Pass a captured bitmap path as the fourth argument to attach an image to a failing step.
- ⚙️ **Properties:** Reporter.Filter, Reporter.ReportPath, and Reporter.RunStatus add control over what gets logged and where results are saved.
- 🧪 **Examples:** Wrap ReportEvent inside an If…Then check so each step reports pass or fail from the real outcome.
- 🚫 **Filtering:** Set Reporter.Filter to rfEnableErrorsAndWarnings during CI runs so passed steps do not bury genuine failures.
- 📊 **Custom reports:** Combine results.xml with an XSL, or a VBScript library, to present results the way stakeholders expect.

Read More

![](https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png)

## What Is Reporter.ReportEvent in UFT/QTP?

**Reporter.ReportEvent** is a standard method built into UFT/QTP (now sold as OpenText/Micro Focus UFT One) that writes a custom, human-readable message directly into the test results window. Unlike the automatic pass or fail verdicts that built-in checkpoints generate, a ReportEvent call lets the tester decide exactly what gets logged, when, and how it should be labeled.

This [HP QTP tutorial](https://www.guru99.com/quick-test-professional-qtp-tutorial.html) demonstrates the use of the function **Reporter.ReportEvent** and **Results Formatting**. The tutorial asks you to build a short script, and completing that scripting exercise is the fastest way to see custom reporting update the Results tree in real time.

Click [here](https://www.guru99.com/faq#faq1) if the video is not accessible  

Reporter.ReportEvent matters most in automation because a script usually runs unattended, on a schedule or inside a CI/CD pipeline. The run results file becomes the only record of what happened, so a step that fails silently, or passes without explanation, makes debugging much harder later. Adding an explicit ReportEvent call after a critical action turns the Results tree into a readable, step-by-step audit trail that a tester, developer, or manager can review without opening the script itself.

This is different from an object checkpoint, which UFT generates automatically and reports using its own default step name. Reporter.ReportEvent instead lets you attach business-meaningful language, such as “Order confirmation displayed” rather than a generic “Check Point Pass on WebEdit object,” which is far easier for a non-technical stakeholder to read in the final report. The method works the same way whether the script targets a web page, a Windows desktop application, or a mainframe terminal, since Reporter is a global object rather than a property of any one test object.

Guru99’s UFT/QTP series covers this method right after [If, Else, and Exists statements](https://www.guru99.com/uft-qtp-if-else.html), because most Reporter.ReportEvent calls sit inside a conditional block that decides whether the outcome should be reported as micPass or micFail.

## Reporter.ReportEvent Syntax and EventStatus Values

You can use **Reporter.ReportEvent** to report custom test steps in Micro Focus UFT’s test results tree. The method accepts three required arguments and one optional argument, in a fixed order, as shown below.

```
Reporter.ReportEvent EventStatus, ReportStepName, Details [, ImageFilePath]
```

**EventStatus** sets the icon and color shown for the step and can flip the overall run status; **ReportStepName** is the short label that appears in the Test Results tree, generally written as the expected result; **Details** holds the longer description, typically the actual result observed; and the optional **ImageFilePath** attaches a screenshot captured earlier in the script to that specific step.

| VALUE | CONSTANT | EFFECT ON RESULTS | EFFECT ON RUN STATUS |
| --- | --- | --- | --- |
| 0 | micPass | Step is shown as Pass in the Results tree | No change; test continues as passing |
| 1 | micFail | Step is shown as Fail in the Results tree | Overall run status changes to Fail |
| 2 | micDone | Step is shown as an informational message | No change to Pass/Fail status |
| 3 | micWarning | Step is shown as a warning | No change to Pass/Fail status |

Each constant can also be passed as its numeric value instead of its name, so **Reporter.ReportEvent 1, “Step”, “Detail”** behaves exactly like **Reporter.ReportEvent micFail, “Step”, “Detail”**. Using the named constant is easier to read in a script that another tester will maintain later.

A script commonly nests several ReportEvent calls inside one action: a micDone entry before an action starts, one micPass or micFail entry for the key check, and additional micWarning entries for anything unusual noticed along the way.

- When test cases are executed using automation tools, it can be difficult for certain users to understand the raw test results. You can use **results.xml to create an XSL file that presents the test results the way you prefer**.
- You can also use [VBScript](https://www.guru99.com/vbscript-tutorials-for-beginners.html) library functions to **store the results in an xls or a text file** for reporting outside UFT.

**Don't Miss:**

- [IF, Else, End IF, Exists in QTP/UFT with Example](https://www.guru99.com/uft-qtp-if-else.html)
- [GetRoProperty, GetToProperty in QTP/UFT with Example](https://www.guru99.com/uft-qtp-objectspy-getroproperty.html)
- [Descriptive Programming in QTP/UFT: Dynamic & Static](https://www.guru99.com/uft-qtp-descriptive-programming.html)
- [Business Process Testing(BPT) Framework in QTP/UFT](https://www.guru99.com/business-process-testing-bpt-tutorial.html)

## How to Use Reporter.ReportEvent: Practical Examples

Knowing the syntax is one thing; seeing it inside a real script is what makes the four status constants click. The example below wraps a check inside an If…Then…Else statement, then reports a pass or a fail with Reporter.ReportEvent so the outcome appears in the Results tree exactly where a reviewer expects it.

```
If Browser("Guru99 Demo").Page("Guru99 Demo").WebButton("Login").Exist(5) Then
    Reporter.ReportEvent micPass, "Login button check", "Login button was found on the page"
Else
    Reporter.ReportEvent micFail, "Login button check", "Login button was not found on the page"
End If
```

This mirrors the pattern shown in Guru99’s [VBScript conditional statements](https://www.guru99.com/vbscript-conditional-statements.html) tutorial, where an If…Then…Else block chooses between two outcomes; the only difference here is that each branch also calls Reporter.ReportEvent to log the result.

Use **micDone** for a step that is purely informational, and **micWarning** when something looks unusual but should not fail the run outright. The next snippet logs a data-entry step as Done, then flags a slow response as a Warning and attaches a screenshot using the optional ImageFilePath argument.

```
Reporter.ReportEvent micDone, "Enter search text", "Typed 'UFT tutorial' into the search box"
errorImage = "C:\Results\SearchDelay.png"
Browser("Guru99 Demo").CaptureBitmap errorImage, True
Reporter.ReportEvent micWarning, "Search response time", "Results took longer than 5 seconds to load", errorImage
```

Keep **ReportStepName** short and keep **Details** specific about the actual result. A reviewer scanning hundreds of logged steps after a failed overnight run should be able to tell what happened without opening the script itself, and a consistent naming pattern across every action makes that scan much faster.

Teams that call ReportEvent from many scripts often move this logic into a shared VBScript function, such as LogStep(status, name, details), so every script produces a consistent Results tree without repeating the same If…Then block.

## Reporter Object Properties: Filter, ReportPath, and RunStatus

Reporter.ReportEvent is not the only member of the Reporter object. Three additional properties give extra control over what the results contain and where UFT stores them, and they show up frequently in production automation frameworks.

| PROPERTY | PURPOSE | TYPICAL USE |
| --- | --- | --- |
| Filter | Controls which event types are written to the results | Reporter.Filter = rfEnableErrorsAndWarnings hides passed steps in a long run |
| ReportPath | Read-only; returns the folder where the current run’s results are stored | resultsFolder = Reporter.ReportPath |
| RunStatus | Read-only; returns the current Pass/Fail status of the run so far | If Reporter.RunStatus = micFail Then Exit Action |

Reporter.Filter accepts four values: 0 or rfEnableAll shows every event and is the default; 1 or rfEnableErrorsAndWarnings hides passed steps; 2 or rfEnableErrorsOnly hides both passed steps and warnings; and 3 or rfDisableAll turns off result logging entirely. Checking Reporter.RunStatus mid-script lets a test branch its own logic, for example skipping the remaining steps in an action once an earlier step has already failed.

Because ReportPath and RunStatus are read-only, you cannot assign a value to them; use them to read information about the current run, for example writing the results folder path to a log file at the start of a script, or short-circuiting a long action after a fatal failure. Reading these properties adds negligible overhead, so it is safe to check Reporter.RunStatus after every major step in a long regression suite without slowing the run down in any noticeable way.

## Best Practices for Reporter.ReportEvent in UFT

A few habits keep custom reporting useful instead of noisy.

- **Reserve micFail for real failures:** Every micFail call flips Reporter.RunStatus, so using it for cosmetic issues hides genuine defects later in the same run.
- **Write ReportStepName like an expected result:** A reviewer should understand the check from the step name alone, without reading the Details column.
- **Capture screenshots only on failure:** Passing ImageFilePath on every single step fills the results folder quickly and slows the run down for little benefit.
- **Filter noisy runs:** Set Reporter.Filter to rfEnableErrorsAndWarnings for scheduled or CI runs so passed steps do not bury the failures that matter.
- **Centralize the logic:** Wrap Reporter.ReportEvent calls inside a reusable [action](https://www.guru99.com/uft-qtp-actions.html) or function library so every script in the suite logs results the same way.
- **Export for non-technical readers:** Combine results.xml with a custom XSL when stakeholders outside the QA team need to review outcomes without opening UFT.

## FAQs

🔎 What is the difference between Reporter.ReportEvent and Reporter.ReportHTMLEvent?

ReportEvent writes plain text to the Results tree. ReportHTMLEvent, available since UFT 12.52, accepts HTML in the step name and details so you can bold, color, or format text in the Run Results Viewer.

⚠️ Do micWarning or micDone change a UFT test’s overall Pass/Fail status?

No. Only micFail changes the overall run status to Fail. micDone and micWarning both write a step to the Results tree for information, but the test can still finish as Passed even if warnings were logged.

🖼️ Can I attach a screenshot to a Reporter.ReportEvent step automatically?

Yes. Capture a bitmap with an object’s CaptureBitmap method, save it to a file, and pass that file path as the optional fourth ImageFilePath argument. UFT displays the image in the Captured Data pane for that step.

🤖 Can AI tools help write or review Reporter.ReportEvent statements?

Yes. AI coding assistants can generate the If…Then and ReportEvent boilerplate from a plain-language description of a check, and can flag scripts that misuse micFail or skip Details. A tester should still confirm the logged status matches the real outcome.

🧠 How does AI-based test reporting compare with manual Reporter.ReportEvent logging?

AI-driven observability tools can summarize a run and highlight anomalies automatically, but Reporter.ReportEvent still gives the precise, developer-controlled step names and statuses that feed those tools. Most teams use both together rather than replacing one with the other.

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png","url":"https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png","width":"700","height":"250","caption":"Reporter.ReportEvent in UFT/QTP","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/qtp","name":"UFT"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html","name":"Reporter.ReportEvent in UFT/QTP with Example"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#webpage","url":"https://www.guru99.com/uft-qtp-reporter-reportevent.html","name":"Reporter.ReportEvent in UFT/QTP with Example","dateModified":"2026-10-10T17:09:50+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/editorial","name":"Editorial Team","url":"https://www.guru99.com/author/editorial","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/favicon-new-logo.png","url":"https://www.guru99.com/images/favicon-new-logo.png","caption":"Editorial Team","inLanguage":"en-US"},"sameAs":["https://www.guru99.com/editorial-team"],"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"UFT","headline":"Reporter.ReportEvent in UFT/QTP with Example","description":"This HP QTP tutorial demonstrates the use of the function Reporter.ReportEvent and Results Formatting with syntax and examples for better understanding.","keywords":"qtp","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/editorial","name":"Editorial Team"},"dateModified":"2026-10-10T17:09:50+05:30","image":{"@id":"https://www.guru99.com/images/reporter-reportevent-in-uft-qtp.png"},"copyrightYear":"2026","name":"Reporter.ReportEvent in UFT/QTP with Example","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between Reporter.ReportEvent and Reporter.ReportHTMLEvent?","acceptedAnswer":{"@type":"Answer","text":"ReportEvent writes plain text to the Results tree. ReportHTMLEvent, available since UFT 12.52, accepts HTML in the step name and details so you can bold, color, or format text in the Run Results Viewer."}},{"@type":"Question","name":"Do micWarning or micDone change a UFT test's overall Pass/Fail status?","acceptedAnswer":{"@type":"Answer","text":"No. Only micFail changes the overall run status to Fail. micDone and micWarning both write a step to the Results tree for information, but the test can still finish as Passed even if warnings were logged."}},{"@type":"Question","name":"Can I attach a screenshot to a Reporter.ReportEvent step automatically?","acceptedAnswer":{"@type":"Answer","text":"Yes. Capture a bitmap with an object's CaptureBitmap method, save it to a file, and pass that file path as the optional fourth ImageFilePath argument. UFT displays the image in the Captured Data pane for that step."}},{"@type":"Question","name":"Can AI tools help write or review Reporter.ReportEvent statements?","acceptedAnswer":{"@type":"Answer","text":"Yes. AI coding assistants can generate the If...Then and ReportEvent boilerplate from a plain-language description of a check, and can flag scripts that misuse micFail or skip Details. A tester should still confirm the logged status matches the real outcome."}},{"@type":"Question","name":"How does AI-based test reporting compare with manual Reporter.ReportEvent logging?","acceptedAnswer":{"@type":"Answer","text":"AI-driven observability tools can summarize a run and highlight anomalies automatically, but Reporter.ReportEvent still gives the precise, developer-controlled step names and statuses that feed those tools. Most teams use both together rather than replacing one with the other."}}]}],"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#schema-595938","isPartOf":{"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#webpage"}},{"@type":"VideoObject","embedUrl":"https://www.youtube.com/embed/6npeeTJhnO4","name":"Reporter.ReportEvent in UFT/QTP with Example","description":"This HP QTP tutorial demonstrates the use of the function Reporter.ReportEvent and Results Formatting with syntax and examples for better understanding.","uploadDate":"2020-01-16T00:00:00+05:30","thumbnailUrl":"https://i.ytimg.com/vi/6npeeTJhnO4/maxresdefault.jpg","hasPart":[],"width":"640","height":"390","@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#schema-595940","isPartOf":{"@id":"https://www.guru99.com/uft-qtp-reporter-reportevent.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"}]}
```
