Skip to main content

Getting started

.NET

The same PDF reports for Playwright .NET test runs. One logger covers NUnit, MSTest, and xUnit. Your subscription issues a key for each test runner, so .NET gets its own key and its own allowance of machines, separate from the ones your other suites use.

Install

bash
dotnet add package ReportForge.Playwright.Pdf

That is the whole setup. The logger reuses the Node runtime that Microsoft.Playwright already places in your test output and the Chromium that playwright install manages, so there is no npm install and no separate browser download.

Quick start

bash
set RF_LICENSE_KEY=RFNT-XXXX-XXXX-XXXX-XXXXdotnet test --logger "reportforge;output=reports/run.pdf;template=detailed"

The run summary prints the PDF path when it is written. Your tests always run in full; without an active subscription only the PDF is skipped, with one warning. Screenshot attachments on failed tests are embedded in the report.

Configuration

Quick options ride the logger string: output (the outputFile path, tokens included) and template. Everything else comes from a JSON file with the same camelCase names as the full options reference:

bash
dotnet test --logger "reportforge;optionsFile=rf-options.json"
rf-options.json
{  "template": "detailed",  "outputFile": "reports/{date}-{branch}-report.pdf",  "projectName": "Checkout suite",  "watermark": "CONFIDENTIAL"}

Individual logger parameters override the options file. Options are validated by the report engine, and a bad key is reported with the exact path that is wrong.

How it works

  1. The logger collects results at the test-platform layer, so NUnit, MSTest, and xUnit all work unchanged.
  2. After the run it hands them to the bundled report engine using the Node runtime Microsoft.Playwright ships.
  3. The engine validates your license, renders the PDF with a Playwright-managed Chromium, and prints the output path.

Retried tests appear as flaky with their full attempt history; categories and traits become tags and feed the requirements matrix. Overrides for unusual environments: RF_NODE_PATH, PUPPETEER_EXECUTABLE_PATH, RF_ENGINE_PATH.

Current limitations

  • Live run streaming works: add "live": { "enabled": true } to the options file with RF_LICENSE_KEY set and the run prints a shareable watch link. The test platform reports results only on completion, so rows appear as each test finishes; the live step trail stays Node.js-only.
  • Step trees inside the failure deep dive need Playwright's step events, which the test platform does not emit; console output capture works.
  • The cross-browser comparison section needs 2+ projects in one run; a dotnet test run drives one browser, so it stays hidden here.