Interface IReporter
Accesses the HTML Report.
public interface IReporter
Properties
ReportConfiguration
Returns the ReportConfiguration interface, which enables you to customize the report behavior.
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.
string ReportDescription { get; set; }
Property Value
ReportLevel
The report level used to generate the report.
ReportLevel ReportLevel { get; set; }
Property Value
ReportTitle
the report title. Default = Run Results.
string ReportTitle { get; set; }
Property Value
SnapshotCaptureLevel
The snapshot capture level used to generate the report.
CaptureLevel SnapshotCaptureLevel { get; set; }
Property Value
- CaptureLevel
Possible values: CaptureLevel
Status
The runtime status of the report.
Status Status { get; }
Property Value
Methods
AddRunInformation(string, string)
Adds a custom entry to the top section of the report.
void AddRunInformation(string fieldName, string fieldValue)
Parameters
EndReportingContext()
Ends the section in the report.
void EndReportingContext()
EndTest(Status)
Ends the current test level and optionally sets the status for the test.
void EndTest(Status status = Status.Passed)
Parameters
Remarks
Required only when using IReporter in a test class that does not inherit from UnitTestBase.
GenerateReport()
Generates the report.
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.).
Status GetCurrentExecutionContextStatus()
Returns
- Status
The status of the current execution context as a ReportLevel object.
Init(ReportConfiguration)
Initializes the specified ReportConfiguration.
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 report including the information about the step as a ReportAdditionalInfo object.
void ReportEvent(string stepName, ReportAdditionalInfo reportAdditionalInfo)
Parameters
stepNamestringreportAdditionalInfoReportAdditionalInfo
ReportEvent(string, string)
Adds a custom step to the report with default status "Passed".
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.
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 report including the provided exception and image object.
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 report including exception details and the image from the specified path.
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.
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.
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.
void StartReportingContext(string contextName, ReportContextInfo reportContextInfo)
Parameters
contextNamestringThe section name.
reportContextInfoReportContextInfoThe ReportAdditionalInfo object which contains the information to describe the section.
StartReportingContext(string, string, IDictionary<string, object>)
Starts a named section in the report.
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".
void StartScreenRecording()
StartScreenRecording(bool)
Starts a screen recording which will be saved to the report folder. The recording file format is ".avi".
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".
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".
void StartScreenRecording(string outputPath)
Parameters
outputPathstringtarget location for the recorded video
StartTest(string, string)
Starts a new test node in the report test flow tree.
void StartTest(string testName, string testDescription = "")
Parameters
testNamestringThe test name.
testDescriptionstringOptional. The test description. Default = blank.
Remarks
Required only when using IReporter in a class that does not inherit from UnitTestBase.
StopScreenRecording()
Stops screen recording.
void StopScreenRecording()