Report code samples (.NET SDK)
Customize the UFT Developer run report settings
This example shows how to use the Reporter.Init() method to initialize the Reporter before using it.
Reporter.Init(new ReportConfiguration { Title = "WinForms", Description = "Using Report in Console application", IsOverrideExisting = true, ReportFolder = "WinFormsResults", ReportLevel = ReportLevel.All, SnapshotsLevel = CaptureLevel.OnError, TargetDirectory = "." });
Access current report status during runtime
This example shows how to access the current report status during runtime, and write different scenarios of the test execution according to the obtained value.
Status reportStatus = Reporter.Status; if (reportStatus == Status.Passed) { //continue test execution } else { //make custom action }