Table of Contents

Class ReportEnvironment

Namespace
Ranorex.Core.Reporting
Assembly
Ranorex.Core.dll

Provides access to all files dependent to a specific report and allows to configure placement options for these files.

public class ReportEnvironment
Inheritance
ReportEnvironment
Inherited Members

Properties

CustomFilesDirectory

Directory which contains a custom report template.

public string CustomFilesDirectory { get; }

Property Value

string

HasReferenceFile

True if report has external referenced files.

public bool HasReferenceFile { get; }

Property Value

bool

IsZippedReport

True if report is zipped

public bool IsZippedReport { get; }

Property Value

bool

ReportDataFileName

Filename of the report xml-Datafile.

public string ReportDataFileName { get; }

Property Value

string

ReportDataFilePath

Full path of the report xml-Datafile. (e.g. test.rxlog.data)

public string ReportDataFilePath { get; }

Property Value

string

ReportFileDirectory

Directory which contains the report.

public string ReportFileDirectory { get; }

Property Value

string

ReportName

Report name created from pattern (e.g. TestReport_20121009_151258).

public string ReportName { get; }

Property Value

string

ReportScreenshotFolderName

Name of the folder where screenshots are placed.

public string ReportScreenshotFolderName { get; }

Property Value

string

ReportScreenshotFolderPath

Absolute path to the screenshot folder.

public string ReportScreenshotFolderPath { get; }

Property Value

string

ReportScreenshotRelativPath

Relative path of the screenshot folder.

public string ReportScreenshotRelativPath { get; }

Property Value

string

ReportVideoFolderName

Name of the folder where videos are placed.

public string ReportVideoFolderName { get; }

Property Value

string

ReportVideoFolderPath

Absolute path to the video folder.

public string ReportVideoFolderPath { get; }

Property Value

string

ReportViewFileName

Filename of the report View-File. (e.g. test.rxlog)

public string ReportViewFileName { get; }

Property Value

string

ReportViewFilePath

Full path to the report View-File.

public string ReportViewFilePath { get; }

Property Value

string

ReportZipFilePath

Full path of the zipped report. (e.g. test.rxzlog)

public string ReportZipFilePath { get; }

Property Value

string

Methods

Create(string, string, string)

Creates report environment from filename, path and path to report template.

public static ReportEnvironment Create(string reportViewName, string reportFileDirectory, string customFilesDirectory)

Parameters

reportViewName string

Name of the report View-File (.rxlog extension)

reportFileDirectory string

Root directory containing the report.

customFilesDirectory string

Path to report template. Use string.Empty if no template is used.

Returns

ReportEnvironment

New instance of report environment.

CreateFromDataFilename(string, string)

Creates report environment from full Data-File path and path to report template.

public static ReportEnvironment CreateFromDataFilename(string dataFilePath, string customFilesDirectory)

Parameters

dataFilePath string

Full path to the report Data-File (.data extension)

customFilesDirectory string

Path to report template. Use string.Empty if no template is used.

Returns

ReportEnvironment

New instance of report environment.

CreateFromViewFilename(string, string)

Creates report environment from full View-File path and path to report template.

public static ReportEnvironment CreateFromViewFilename(string viewFilePath, string customFilesDirectory)

Parameters

viewFilePath string

Full path to the report View-File (.rxlog extension)

customFilesDirectory string

Path to report template. Use string.Empty if no template is used.

Returns

ReportEnvironment

New instance of report environment.

GetDependentFiles()

Get a list of all files which belong to the report environment. This covers default ranorex ressource files (e.g. View-File, XSL-Transformation file, png ressources, all files referenced by the report data-file or explicit reference-file and all files contained in the custom report file directory (if defined).

public List<string> GetDependentFiles()

Returns

List<string>

List of filepaths

GetDependentFilesWithQualifiers()

Get a list of all files which belong to the report environment. This covers default ranorex resource files (e.g. View-File, XSL-Transformation file, png resources, all files referenced by the report data-file or explicit reference-file and all files contained in the custom report file directory (if defined).

public Dictionary<string, ReportEnvironment.ReportFileQualifier> GetDependentFilesWithQualifiers()

Returns

Dictionary<string, ReportEnvironment.ReportFileQualifier>

Dictionary of filepath with ownership qualifiers

IsLegacyReport()

Checks if report environment points to legacy report.

public bool IsLegacyReport()

Returns

bool

true if view-file defined by ReportEnvironment is a Ranorex 2.X report file.

IsReportDataFile(string)

Checks if file has report data extension.

public static bool IsReportDataFile(string filename)

Parameters

filename string

Path to file to check.

Returns

bool

True if filename has report data file extension.

SaveExternals()

Saves all external file to the report root directory. This covers default ranorex ressource files (e.g. View-File, XSL-Transformation file, png ressources or all files contained in the custom report file directory (if defined).

public void SaveExternals()