TrganHtmlReport
Namespace: TrganReport
Class for building and generating Trgan reports. Primary entry point for constructing structured execution reports.
public class TrganHtmlReport
Inheritance Object → TrganHtmlReport
Properties
ReportStats
Represents aggregated statistics for a report, including counts of test containers, tests, and steps categorized by status. Useful for generating summary views, visual indicators, and analytics in the final report.
public ReportStats ReportStats { get; }
Property Value
Config
Centralized configuration for Trgan reports. Provides unified access to all configurations.
public ReportConfig Config { get; }
Property Value
MetaInfo
Metadata section for the report, including author, environment, and custom fields.
public MetaInfo MetaInfo { get; }
Property Value
ReportStartTime
Gets the timestamp when the report was instantiated.
public DateTime ReportStartTime { get; }
Property Value
OutputPath
Gets the output file path for the Trgan report set during initialization.
public string OutputPath { get; private set; }
Property Value
TrganContainers
Gets a read-only list of all containers currently present in the report.
public IReadOnlyList<TrganContainer> TrganContainers { get; }
Property Value
Constructors
TrganHtmlReport(String)
Initializes a new instance of the TrganHtmlReport class with the specified output path.
public TrganHtmlReport(string outputPath)
Parameters
outputPath
String
The full file path where the report will be generated.
Methods
TrganTable(Int32)
Initializes and enables the Trgan table layout with the specified column count.
public TrganTable TrganTable(int columnCount)
Parameters
columnCount
Int32
Number of columns in the table.
Returns
TrganTable
A new TrganHtmlReport.TrganTable(Int32) instance.
CreateContainer(String, String[])
Creates a named container to group related tests.
public TrganContainer CreateContainer(string name, String[] categories)
Parameters
name
String
The name of the container.
categories
String[]
Categories or tag names
Returns
TrganContainer
A new TrganContainer instance.
CreateTest(String, String[])
Creates a test directly to the report without any TrganContainers.
Useful when the report needs to be in scenario/test basis, instead of feature/testclass basis.
For structured reports that follow a Feature → Scenarios hierarchy (e.g., BDD or class-based TDD),
use TrganContainer.CreateTest(String)
public TrganTest CreateTest(string testName, String[] categories)
Parameters
testName
String
The name of the test.
categories
String[]
Optional categories or tag names for the test.
Returns
TrganTest
A new TrganTest instance.
Generate()
Generates the final Trgan Report file.
public void Generate()