Skip to content

Getting Started

This guide walks you through installing TrganReport, creating your first report, organizing tests into containers, and generating a polished HTML output. A typical test flow includes initialization, grouping, execution, and final rendering. Read on to explore each step in detail.


Installation

Install via NuGet,

dotnet add package TrganReport
Or download the latest release:

1. Initialize a Report

Import the namespace and create a new TrganHtmlReport instance, specifying the output path:

using TrganReport;

TrganHtmlReport report = new TrganHtmlReport("reports/TrganReport.html");

2. Organize Tests using TrganContainer

Use TrganContainer to group related test cases for clarity and modularity:

TrganContainer container = report.CreateContainer(name: "Login Tests");

3. Add Tests using TrganTest

Attach tests to a container using TrganTest:

TrganTest test = container.CreateTest(name: "Valid Login");

4. Update Test Status

Mark test outcomes using status methods:

test.Pass("pass message");

5. Generate the Report

Once all containers and tests are defined and updated, finalize the report:

report.Generate();
This will emit a fully styled HTML file at the specified location.


Continue to the next page to explore advanced features.