Class Reporter
Provides the means to report custom events, additional data, and configuration for the report. This class cannot be inherited.
public static class Reporter
- Inheritance
-
Reporter
- Inherited Members
Properties
ReportConfiguration
The report configuration used for generating the report.
public static IReportConfiguration ReportConfiguration { get; }
Property Value
ReportDescription
The report description. The description appears directly below the title in the report. By default, the description is empty.
public static string ReportDescription { get; set; }
Property Value
ReportLevel
The report level used to generate the report.
public static ReportLevel ReportLevel { get; set; }
Property Value
ReportTitle
The report title. Default = Run Results.
public static string ReportTitle { get; set; }
Property Value
SnapshotCaptureLevel
The snapshot capture level used to generate the report.
public static CaptureLevel SnapshotCaptureLevel { get; set; }
Property Value
- CaptureLevel
Possible values: CaptureLevel
Methods
AddRunInformation(string, string)
Adds a custom entry to the top section of the report.
public static void AddRunInformation(string fieldName, string fieldValue)
Parameters
EndReportingContext()
Ends the section in the report.
public static void EndReportingContext()
EndTest(Status)
Ends the current test level and optionally sets the status for the test.
public static void EndTest(Status status = Status.Passed)
Parameters
Remarks
Required only when using Reporter in a class that does not inherit from UnitTestBase.
GenerateReport()
Generates the report.
public static string GenerateReport()
Returns
- string
The path of the generated report folder.
Remarks
Required only when using IReporter in a test class that does not inherit from UnitTestBase.
GetCurrentExecutionContextStatus()
Returns the status of the current execution context. The execution context is equivalent to any superior structure that contains operations (e.g.: test method, reporting context, etc.).
public static Status GetCurrentExecutionContextStatus()
Returns
- Status
The status of the current execution context as a ReportLevel object.
Init(ReportConfiguration)
Initializes the specified ReportConfiguration.
public static void Init(ReportConfiguration configuration)
Parameters
configurationReportConfigurationThe configuration to use for the report.
Remarks
Required only when using IReporter in a test class that does not inherit from UnitTestBase.
ReportEvent(string, ReportAdditionalInfo)
Adds a custom step to the OpenText Functional Testing for Developers including the information about the step as a ReportAdditionalInfo object.
public static void ReportEvent(string stepName, ReportAdditionalInfo reportAdditionalInfo)
Parameters
stepNamestringreportAdditionalInfoReportAdditionalInfo
ReportEvent(string, string)
Adds a custom step to the OpenText Functional Testing for Developers with default status "Passed".
public static void ReportEvent(string stepName, string description)
Parameters
stepNamestringThe name of the reported step. This name is the label of the step node in the report.
descriptionstringThe description of the reported step. The description is displayed in the Details pane of the report.
ReportEvent(string, string, Status, Image)
Adds a custom step to the report including the provided image object.
public static void ReportEvent(string stepName, string description, Status status, Image image)
Parameters
stepNamestringThe name of the reported step. This name is the label of the step node in the report.
descriptionstringThe description of the reported step. The description is displayed in the Details pane of the report.
statusStatusThe Status for the step.
imageImageThe Image to use for the step.
ReportEvent(string, string, Status, Exception, Image)
Adds a custom step to the OpenText Functional Testing for Developers including the provided exception and image object.
public static void ReportEvent(string stepName, string description, Status status, Exception ex, Image image)
Parameters
stepNamestringThe name of the reported step. This name is the label of the step node in the report.
descriptionstringThe description of the reported step. The description is displayed in the Details pane of the report.
statusStatusThe Status for the step.
exExceptionThe exception that occurred.
imageImageThe Image to use for the step.
ReportEvent(string, string, Status, Exception, string)
Adds a custom step to the OpenText Functional Testing for Developers including exception details and the image from the specified path.
public static void ReportEvent(string stepName, string description, Status status, Exception ex, string imagePath = "")
Parameters
stepNamestringThe name of the reported step. This name is the label of the step node in the report.
descriptionstringThe description of the reported step. The description is displayed in the Details pane of the report.
statusStatusThe Status for the step.
exExceptionThe exception that occurred.
imagePathstringThe full path of the image to display for the step. Supported image types: BMP, GIF, JPEG, PNG, TIFF
ReportEvent(string, string, Status, string)
Adds a custom step to the report including the image from the specified path.
public static void ReportEvent(string stepName, string description, Status status, string imagePath = "")
Parameters
stepNamestringThe name of the reported step. This name is the label of the step node in the report.
descriptionstringThe description of the reported step. The description is displayed in the Details pane of the report.
statusStatusThe Status for the step.
imagePathstringThe full path of the image to display for the step. Supported image types: BMP, GIF, JPEG, PNG, TIFF
ReportVerification(Status, VerificationData)
Adds a custom verification step to the report.
public static void ReportVerification(Status reportStatus, VerificationData verificationData)
Parameters
reportStatusStatusThe Status for the verification.
verificationDataVerificationDataThe VerificationData data.
Exceptions
- ArgumentNullException
verificationDataisNULL.
StartReportingContext(string, ReportContextInfo)
Starts a named section in the report.
public static void StartReportingContext(string contextName, ReportContextInfo reportContextInfo)
Parameters
contextNamestringThe section name.
reportContextInfoReportContextInfoThe ReportContextInfo object which contains the information to describe the section.
StartReportingContext(string, string, IDictionary<string, object>)
Starts a named section in the report.
public static void StartReportingContext(string contextName, string contextDescription = "", IDictionary<string, object> additionalData = null)
Parameters
contextNamestringThe section name.
contextDescriptionstringOptional. The section description. Blank by default.
additionalDataIDictionary<string, object>Optional. The dictionary containing additional custom information. Blank by default.
StartScreenRecording()
Starts a screen recording which will be saved to the report folder. Compression is ON. The recording file format is ".avi".
public static void StartScreenRecording()
StartScreenRecording(bool)
Starts a screen recording which will be saved to the report folder. The recording file format is ".avi".
public static void StartScreenRecording(bool useCompression)
Parameters
useCompressionboolif
the recorded video represents a time lapse of the recorded scene, otherwise the full scene gets recordedtrue
StartScreenRecording(bool, string)
Starts screen recording. The recording file format is ".avi".
public static void StartScreenRecording(bool useCompression, string outputPath)
Parameters
useCompressionboolif
the recorded video represents a time lapse of the recorded scene, otherwise the full scene gets recordedtrueoutputPathstringtarget location for the recorded video
StartScreenRecording(string)
Starts screen recording. Compression is ON. The recording file format is ".avi".
public static void StartScreenRecording(string outputPath)
Parameters
outputPathstringtarget location for the recorded video
StartTest(string, string)
Starts a new test level for the report.
public static void StartTest(string testName, string testDescription = "")
Parameters
testNamestringThe name of the test. This name is the label of the test node in the report.
testDescriptionstringThe test description.
Remarks
Required only when using Reporter in a class that does not inherit from UnitTestBase.
StopScreenRecording()
Stops screen recording.
public static void StopScreenRecording()