-
Notifications
You must be signed in to change notification settings - Fork 1
Report Configuration
aryehcitron@gmail.com edited this page May 24, 2026
·
33 revisions
Pass a ReportConfigurationOptions record when generating reports to customise their output:
new ReportConfigurationOptions
{
TestRunReportTitle = "My Service - Test Results", // Full override for the report page title
SpecificationsTitle = "My API Specifications",
PlantUmlServerBaseUrl = "https://plantuml.com/plantuml",
HtmlSpecificationsFileName = "Specifications",
HtmlTestRunReportFileName = "TestRunReport",
YamlSpecificationsFileName = "Specifications",
ReportsFolderPath = "Reports",
ExcludedHeaders = ["Authorization", "X-Api-Key"],
HtmlSpecificationsCustomStyleSheet = "body { font-family: sans-serif; }",
RequestResponsePostProcessor = content => content.Replace("secret", "***"),
RequestResponseMidProcessor = null, // Mid-processing function applied between pre and post processors
LazyLoadDiagramImages = true, // Adds loading="lazy" to <img> tags (PlantUml format only)
SeparateSetup = true,
HighlightSetup = true,
FocusEmphasis = FocusEmphasis.Bold | FocusEmphasis.Colored,
FocusDeEmphasis = FocusDeEmphasis.LightGray,
PlantUmlTheme = "spacelab",
PlantUmlImageFormat = PlantUmlImageFormat.Png,
DiagramFormat = DiagramFormat.PlantUml,
PlantUmlRendering = PlantUmlRendering.BrowserJs, // Or Server, Local, or NodeJs — see wiki
LocalDiagramRenderer = null, // Set to IkvmPlantUmlRenderer.Render when using PlantUmlRendering.Local
LocalDiagramImageDirectory = null, // Set to e.g. "Reports/images" when using local file-based rendering
WriteCiSummary = false, // Set to true to write CI summary — see CI Summary Integration wiki page
MaxCiSummaryDiagrams = 10, // Max diagrams in CI summary
InlineSvgRendering = false, // Embeds SVG inline instead of <img> tags — see Inline SVG Rendering wiki page
InternalFlowTracking = true, // Enables interactive internal flow popups — see Internal Flow Tracking wiki page
InternalFlowDisplay = InternalFlowDisplay.Popup,
InternalFlowTrigger = InternalFlowTrigger.Click,
InternalFlowDiagramStyle = InternalFlowDiagramStyle.ActivityDiagram,
InternalFlowSpanGranularity = InternalFlowSpanGranularity.AutoInstrumentation,
InternalFlowActivitySources = null,
InternalFlowNoDataBehavior = InternalFlowNoDataBehavior.HideLink,
InternalFlowHasDataBehavior = InternalFlowHasDataBehavior.ShowLinkOnHover,
InternalFlowShowFlameChart = true,
InternalFlowFlameChartPosition = InternalFlowFlameChartPosition.BehindWithToggle,
InternalFlowContentStrategy = InternalFlowContentStrategy.Embedded,
InternalFlowFragmentsFolderName = "spans",
InternalFlowPopupCustomStyleSheet = null,
WholeTestFlowVisualization = WholeTestFlowVisualization.Both, // Shows whole-test flow — see Internal Flow Tracking wiki page
FixedNameForReceivingService = null, // Override the receiving service name in diagrams
GenerateComponentDiagram = true, // Generates C4 component diagram — see Component Diagrams wiki page
PublishCiArtifacts = false, // Set to true to publish reports as CI artifacts — see CI Artifact Upload wiki page
CiArtifactName = "TestReports", // Artifact name in CI system
CiArtifactRetentionDays = 1, // Artifact retention in days (GitHub Actions only)
SpecificationsShowStepNumbers = true, // Show hierarchical step numbers (1., 2., 2.1.) in Specifications
TestRunReportShowStepNumbers = false, // Show step numbers in TestRunReport (default off)
CustomCss = null, // Extra CSS injected after the default stylesheet
CustomFaviconBase64 = null, // Base64 data URI for a custom favicon
CustomLogoHtml = null, // Raw HTML injected before the report title (e.g. <img>)
ActivitySourceDiscovery = false, // Include activity source discovery in report diagnostics
DiagnosticMode = false, // Generate DiagnosticReport.html with debug info
GroupParameterizedTests = true, // Group parameterized tests into tables
MaxParameterColumns = 10, // Max columns before falling back to list view
TitleizeParameterNames = true, // Titleize parameter names in column headers (e.g. "region" → "Region")
GraphQlBodyFormat = GraphQlBodyFormat.FormattedWithMetadata, // Default: auto-format GraphQL queries — see Content Formatting
GenerateSpecificationsReport = true, // Set to false to skip HTML specifications
GenerateTestRunReport = true, // Set to false to skip HTML test run report
GenerateSpecificationsData = true, // Set to false to skip YAML/JSON/XML specifications data
GenerateTestRunReportData = true, // Set to false to skip test run report data file
GenerateTestRunReportSchema = true, // Set to false to skip schema file
SetupHighlightColor = "#F6F6F6", // Background colour for setup partition
ExpectedTestCount = null // Guard against partial test runs overwriting specs
}new ReportConfigurationOptions
{
TestRunReportDataFormat = DataFormat.Json, // Default: Json. Also: Yaml, Xml
SpecificationsDataFormat = DataFormat.Yaml // Default: Yaml. Also: Json, Xml
}The TestRunReportDataFormat controls the format of the machine-readable test run data file (default: TestRunReport.json). When diagram and tracking data is available, the file includes PlantUML source and HTTP interaction traces per scenario. See Generated Reports#TestRunReport.json (Machine-Readable Test Run Data).
The SpecificationsDataFormat controls the format of the machine-readable specifications file (default: Specifications.yml).
| Property | Type | Default | Description |
|---|---|---|---|
TestRunReportDataFormat |
DataFormat |
Json |
Format for the test run data file. Json (default), Yaml, or Xml. |
SpecificationsDataFormat |
DataFormat |
Yaml |
Format for the specifications data file. Yaml (default), Json, or Xml. |
| Property | Type | Default | Description |
|---|---|---|---|
PlantUmlServerBaseUrl |
string |
"https://plantuml.com/plantuml" |
Base URL of the PlantUML server used to render diagrams. |
TestRunReportTitle |
string? |
null |
Title displayed at the top of the test run report and in the browser tab. When set, used verbatim — overrides the default title derived from ComponentDiagramOptions.Title or FixedNameForReceivingService. When null, the title is auto-derived: "{ComponentDiagramOptions.Title} - Test Run Report", or "{FixedNameForReceivingService} - Test Run Report", or simply "Test Run Report". |
SpecificationsTitle |
string |
"Service Specifications" |
Title shown at the top of HTML specification reports. |
HtmlSpecificationsFileName |
string |
"Specifications" |
File name (without extension) for the HTML specifications file. |
HtmlTestRunReportFileName |
string |
"TestRunReport" |
File name (without extension) for the HTML test run report. |
YamlSpecificationsFileName |
string |
"Specifications" |
File name (without extension) for the YAML specifications file. |
HtmlSpecificationsCustomStyleSheet |
string? |
Stylesheets.VioletThemeStyleSheet |
Custom CSS injected into the HTML specifications file. When set, replaces the default stylesheet. Defaults to the built-in violet theme. Set to null for no custom stylesheet, or provide your own CSS string. |
ReportsFolderPath |
string |
"Reports" |
Folder path (relative to AppDomain.CurrentDomain.BaseDirectory) where reports are written. |
ExcludedHeaders |
string[] |
[] |
HTTP headers to exclude from diagram notes. Combined with PlantUmlCreator.DefaultExcludedHeaders (Cache-Control, Pragma). See Excluded Headers and Filtering and Redacting Diagram Content. |
RequestResponsePostProcessor |
Func<string, string>? |
null |
Post-processing function applied to both request and response content before rendering in diagrams. Useful for redacting sensitive data. See Filtering and Redacting Diagram Content for recipes. |
RequestResponseMidProcessor |
Func<string, string>? |
null |
Mid-processing function applied to both request and response content between pre-processing and post-processing. Useful for transformations that should happen after initial formatting but before final redaction. See Filtering and Redacting Diagram Content for recipes. |
LazyLoadDiagramImages |
bool |
true |
When true, adds loading="lazy" to diagram <img> tags in HTML reports. Only applies when PlantUmlRendering is Server or Local (image-based rendering). Has no effect with PlantUmlRendering.BrowserJs (uses IntersectionObserver lazy rendering instead). |
SeparateSetup |
bool |
false |
When true, HTTP calls made before StartAction() (or before the first non-GIVEN BDD step) are wrapped in a visual "Setup" partition in the diagram. See Diagram Customisation. |
HighlightSetup |
bool |
true |
When true (and SeparateSetup is enabled), the setup partition is rendered with a background colour. When false, the partition has no background colour. Has no effect when SeparateSetup is false. |
FocusEmphasis |
FocusEmphasis |
Bold |
How focused fields are styled in diagram JSON notes. Flags enum — combine with |. See Content Formatting#DiagramFocus (Field Highlighting). |
FocusDeEmphasis |
FocusDeEmphasis |
LightGray |
How non-focused fields are styled in diagram JSON notes. Flags enum — combine with |. See Content Formatting#DiagramFocus (Field Highlighting). |
PlantUmlTheme |
string? |
null |
Name of a PlantUML theme to apply to all generated diagrams. When set, a !theme <name> directive is injected after @startuml. Browse available themes at the PlantUML Theme Gallery. See Diagram Customisation#PlantUML Themes. |
PlantUmlImageFormat |
PlantUmlImageFormat |
Png |
Image format for rendered diagrams. Png (default) produces raster images; Svg produces scalable vector images. Base64Png and Base64Svg embed images inline as data URIs (requires LocalDiagramRenderer). Controls the URL path segment (/png/ or /svg/) when using a remote server. See PlantUML Server Configuration and Integration PlantUML IKVM. |
DiagramFormat |
DiagramFormat |
PlantUml |
Output format for sequence diagrams. |
PlantUmlRendering |
PlantUmlRendering |
BrowserJs |
How PlantUML diagrams are rendered. BrowserJs (default) renders client-side in the browser via the PlantUML TeaVM JS engine. Server uses a remote PlantUML server. Local renders in-process via IKVM (requires LocalDiagramRenderer). NodeJs renders locally via Node.js — see CI Summary Integration#nodejs-rendering. See PlantUML Browser Rendering and Integration PlantUML IKVM. |
LocalDiagramRenderer |
Func<string, PlantUmlImageFormat, byte[]>? |
null |
Function that renders PlantUML text to image bytes locally. Required when PlantUmlRendering is Local. Use IkvmPlantUmlRenderer.Render from the Kronikol.PlantUml.Ikvm package. See Integration PlantUML IKVM. |
LocalDiagramImageDirectory |
string? |
null |
Directory where locally rendered image files are saved. Required when using LocalDiagramRenderer with Png or Svg format. Typically set to a subfolder like Reports/images. Not needed for Base64Png/Base64Svg. |
GenerateComponentDiagram |
bool |
true |
When true, generates a C4-style component diagram aggregating all tracked interactions across the test suite. Produces ComponentDiagram.puml and ComponentDiagram.html files alongside existing reports. See Component Diagrams. |
ComponentDiagramOptions |
ComponentDiagramOptions? |
null |
Configuration for the component diagram: custom title, PlantUML theme, participant filter, relationship label formatter, and output file name. Only used when GenerateComponentDiagram is true. See Component Diagrams. |
InlineSvgRendering |
bool |
false |
When true, embeds PlantUML SVG diagrams inline in the HTML instead of using <img> tags. Requires PlantUmlImageFormat.Svg for Server/Local rendering. Automatically enabled when InternalFlowTracking is true. See Inline SVG Rendering. |
InternalFlowTracking |
bool |
true |
Master switch for internal flow popups. When true, clicking a sequence diagram arrow shows the internal SUT activity (OTel spans) that occurred during that segment. Forces InlineSvgRendering = true and PlantUmlImageFormat.Svg for Server/Local. Span capture is auto-started by TestTrackingMessageHandler — no extra packages needed for the standard case. See Internal Flow Tracking. |
InternalFlowDisplay |
InternalFlowDisplay |
Popup |
How internal flow content is shown. Popup shows it in a modal overlay. Inline embeds it below the diagram. |
InternalFlowTrigger |
InternalFlowTrigger |
Click |
User interaction that opens the popup. Click requires clicking the arrow. Hover shows on mouse hover. |
InternalFlowDiagramStyle |
InternalFlowDiagramStyle |
ActivityDiagram |
Visual style for internal flow content. ActivityDiagram renders a PlantUML activity diagram with swimlanes. CallTree renders an HTML nested list. |
InternalFlowSpanGranularity |
InternalFlowSpanGranularity |
AutoInstrumentation |
Controls which spans are included. AutoInstrumentation filters to well-known sources (ASP.NET Core, HttpClient, EF Core, Redis, Cosmos, etc. — see Internal Flow Tracking#Well-Known Auto-Instrumentation Sources for the full list). Manual uses only the sources listed in InternalFlowActivitySources. Full includes all captured spans. See Internal Flow Tracking#Span Granularity for details and a decision table. |
InternalFlowActivitySources |
string[]? |
null |
Activity source names to include when InternalFlowSpanGranularity is Manual. Ignored for other granularity settings. Also configurable on TestTrackingMessageHandlerOptions for capture-time filtering — see HTTP Tracking Setup#TestTrackingMessageHandlerOptions. |
InternalFlowNoDataBehavior |
InternalFlowNoDataBehavior |
HideLink |
Behaviour when no spans exist for a segment. HideLink (default) removes the clickable link. ShowMessage shows a diagnostic message. VisualDistinction styles the arrow differently. |
InternalFlowHasDataBehavior |
InternalFlowHasDataBehavior |
ShowLinkOnHover |
Behaviour when spans exist for a segment. ShowLinkOnHover (default) shows the clickable link only when hovering over the arrow. ShowLink always shows the link. |
InternalFlowShowFlameChart |
bool |
true |
When true, adds a flame chart visualisation alongside the main content. |
InternalFlowFlameChartPosition |
InternalFlowFlameChartPosition |
BehindWithToggle |
Where the flame chart appears. Underneath places it below the main content. BehindWithToggle shows a toggle button. |
InternalFlowContentStrategy |
InternalFlowContentStrategy |
Embedded |
How segment data is stored. Embedded includes all data inline. SeparateFragments writes each segment to a separate file. |
InternalFlowFragmentsFolderName |
string |
"spans" |
Folder name for fragment files when using SeparateFragments strategy. Relative to the reports folder. |
InternalFlowPopupCustomStyleSheet |
string? |
null |
Custom CSS injected into the popup. Allows overriding or extending the default popup styles. |
WholeTestFlowVisualization |
WholeTestFlowVisualization |
Both |
Controls whether a whole-test flow section is shown per scenario. None disables it. FlameChart shows only a flame chart with boundary markers. ActivityDiagram shows only a PlantUML activity diagram. Both shows a toggle between the two. See Internal Flow Tracking#Whole Test Flow. |
GenerateComponentDiagram |
bool |
true |
When true, generates a C4-style component diagram. See Component Diagrams. |
ComponentDiagramOptions |
ComponentDiagramOptions? |
null |
Configuration for the component diagram. See Component Diagrams. |
SequenceDiagramArrowColors |
bool |
true |
When true, sequence diagram arrows are coloured by the target service's dependency type. When false, arrows use the default PlantUML style. |
SequenceDiagramParticipantColors |
bool |
false |
When true, sequence diagram participant declarations include a background colour matching their dependency type. |
DependencyColors |
Dictionary<string, string>? |
null |
Per-category color overrides for dependency-type arrow/participant colouring. Key is the category string (e.g. "CosmosDB", "Redis"), value is a hex colour (e.g. "#FF0000"). Applies to both sequence and component diagrams. |
ServiceTypeOverrides |
Dictionary<string, string>? |
null |
Override the auto-detected dependency type for specific service names. Key is the service name, value is the category (e.g. "Database", "Cache"). |
GraphQlBodyFormat |
GraphQlBodyFormat |
FormattedWithMetadata |
Controls how GraphQL request bodies are displayed in sequence diagram notes. Json = previous behaviour (JSON pretty-print, query stays single-line). FormattedQueryOnly = formatted query only, no headers or metadata. Formatted = formatted query with headers. FormattedWithMetadata = formatted query with headers, variables, and extensions. When FocusFields are in use, automatically falls back to Json. See Content Formatting#GraphQL Body Formatting. |
WriteCiSummary |
bool |
false |
When true, generates a Markdown CI summary and writes it to the detected CI platform (GitHub Actions or Azure DevOps). The summary is also saved to Reports/CiSummary.md. See CI Summary Integration. |
MaxCiSummaryDiagrams |
int |
10 |
Maximum number of sequence diagrams to include in the CI summary. When failing: caps the number of failed scenarios shown. When passing: caps the number of showcase diagrams. See CI Summary Integration. |
FixedNameForReceivingService |
string? |
null |
When set, overrides the receiving service name in all diagram arrows. Useful when the target service name is dynamic or when you want a consistent name. Also configurable on TestTrackingMessageHandlerOptions. See HTTP Tracking Setup. |
SpecificationsShowStepNumbers |
bool |
true |
When true, shows hierarchical step numbers (e.g. 1., 2., 2.1., 2.1.1.) in the Specifications HTML report. |
TestRunReportShowStepNumbers |
bool |
false |
When true, shows hierarchical step numbers in the TestRunReport HTML report. |
InlineBackgroundSteps |
bool |
false |
When true, background steps are inlined into each scenario rather than shown separately. |
CustomCss |
string? |
null |
Extra CSS injected in a separate <style> block after the default stylesheet. Allows customising report appearance without replacing the entire stylesheet. |
CustomFaviconBase64 |
string? |
null |
Base64-encoded data URI for a custom favicon. Set to e.g. "data:image/png;base64,ABC123..." to override the browser tab icon. |
CustomLogoHtml |
string? |
null |
Raw HTML injected inside a <div class="custom-logo"> before the report title <h1>. Useful for adding a company logo, e.g. "<img src='data:image/png;base64,...' alt='Logo'>". |
ActivitySourceDiscovery |
bool |
false |
When true, report diagnostics include a list of all discovered ActivitySource names and their span counts. Helps identify which OpenTelemetry sources are producing data. See Diagnostics and Debugging. |
DiagnosticMode |
bool |
false |
When true, generates a DiagnosticReport.html file alongside normal reports containing configuration dumps, log counts, unpaired requests, orphaned test IDs, and activity source discovery. See Diagnostics and Debugging. |
GroupParameterizedTests |
bool |
true |
When true, parameterized tests (e.g. [Theory], [TestCase], Scenario Outline) that share the same test method are grouped into a single collapsible entry with a parameter table. Each row shows the input parameters, status, and duration. Clicking a row switches the detail panel, sequence diagrams, and whole-test-flow visualisations. When false, parameterized tests render individually (except tests with a shared OutlineId, which are always grouped). Even single-instance parameterized tests (e.g. a single [InlineData]) are rendered in table format when they have parameters. See Generated Reports#Parameterized Test Grouping. |
MaxParameterColumns |
int |
10 |
Maximum number of parameter columns to display in the R1 (scalar columns) layout. When a parameterized group has more parameters than this limit, the table falls back to R0 (full display name) layout. This prevents excessively wide tables when test methods have many parameters. Only applies when GroupParameterizedTests is true. |
TitleizeParameterNames |
bool |
true |
When true, parameter names in column headers are titleized (e.g. region → Region, firstName → First Name). When false, raw parameter names from the test framework are displayed as-is. |
GenerateSpecificationsReport |
bool |
true |
When false, skips generating the HTML specifications report. |
GenerateTestRunReport |
bool |
true |
When false, skips generating the HTML test run report. |
GenerateSpecificationsData |
bool |
true |
When false, skips generating the specifications data file (YAML/JSON/XML). |
GenerateTestRunReportData |
bool |
true |
When false, skips generating the test run report data file. |
GenerateTestRunReportSchema |
bool |
true |
When false, skips generating the test run report schema file (.schema.json or .schema.xsd). |
SetupHighlightColor |
string |
"#F6F6F6" |
Background colour for the setup partition when SeparateSetup and HighlightSetup are both true. |
ExpectedTestCount |
Func<int>? |
null |
When set, report generation is skipped if the actual test count is less than the expected count. Guards against partial test runs overwriting complete specifications. |
Getting Started
Common Tasks
Integration Guides
- Integration xUnit3
- Integration xUnit2
- Integration NUnit
- Integration MSTest
- Integration TUnit
- Integration BDDfy xUnit3
- Integration LightBDD xUnit2
- Integration LightBDD xUnit3
- Integration LightBDD TUnit
- Integration ReqNRoll xUnit2
- Integration ReqNRoll xUnit3
- Integration ReqNRoll TUnit
Extensions
- Integration AtlasDataApi Extension
- Integration BigQuery Extension
- Integration Bigtable Extension
- Integration BlobStorage Extension
- Integration CloudStorage Extension
- Integration CosmosDB Extension
- Integration Dapper Extension
- Integration DynamoDB Extension
- Integration EF Core Relational Extension
- Integration Elasticsearch Extension
- Integration EventBridge Extension
- Integration EventHubs Extension
- Integration Grpc Extension
- Integration Kafka Extension
- Integration MassTransit Extension
- Integration MongoDB Extension
- Integration MySqlConnector Extension
- Integration Npgsql Extension
- Integration Oracle Extension
- Integration PubSub Extension
- Integration Redis Extension
- Integration S3 Extension
- Integration ServiceBus Extension
- Integration SNS Extension
- Integration Spanner Extension
- Integration SqlClient Extension
- Integration Sqlite Extension
- Integration SQS Extension
- Integration StorageQueues Extension
- Integration OpenTelemetry Extension
- Integration DispatchProxy Extension
- Integration MediatR Extension
- Integration PlantUML IKVM
Configuration
- Tracking Dependencies
- Tracking Custom Dependencies
- HTTP Tracking Setup
- Report Configuration
- Diagram Customisation
- Phase-Aware Tracking
- Content Formatting
- PlantUML Server Configuration
Features
- Generated Reports
- Search Syntax
- Component Diagrams
- PlantUML Browser Rendering
- Inline SVG Rendering
- Internal Flow Tracking
- Tags and Attributes
- Excluding Requests
- Excluded Headers
- Multi-Host Test Architectures
- Event-Driven Architecture Testing
- Service Bus Tracking Patterns
- Background Thread Correlation
- Parallel-Safe Background Correlation
- Event & Message Tracking
- Assertion Tracking
- Step Tracking
- Tabular Attributes
- Large Response and Diagram Handling
- Diagnostics and Debugging
- CI Summary Integration
- CI Artifact Upload
Reference