Skip to content
ConsoleMonster
Class

TestRunSummary

ConsoleMonster.TestRuns

Namespace
ConsoleMonster.TestRuns
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

The end of a test run, for the scrollback: a table of results by file, or by group when the records named one (TestRecord.Group), with a totals row (each row's status is its colour signal) and a worst-severity column when the records had severities; the skip and not-run reasons; the failures and errors as in the live view; a closing line with the outcome and the totals; and the report path, as a link where the terminal supports links.

Inheritance

  • object
  • TestRunSummary

Usage

Explore 16 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 8

Constructors

public TestRunSummary(TestRunSnapshot snapshot) #

Creates the summary of a snapshot.

Parameters

snapshot ConsoleMonster.TestRuns.TestRunSnapshot required
The snapshot (usually taken after the run finished).

Methods

public Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public int MaxFailures { get; set; } #

The most failures listed (default 20), and the most results to investigate; the rest are counted.

public bool ShowFailures { get; set; } #

Whether the failures are listed (default true); off when the test framework already printed them.

public string? GroupLabel { get; set; } #

The heading of the group column when the records named groups (for example Product), or null for the built-in word.

public string? ReportPath { get; set; } #

The report written for the run (a file path or an http, https or file URL), shown on the last line; a link where the terminal supports links, the plain path otherwise. Null (default) shows no report line.

Extension Methods

public static TestRunSummary GroupLabel(TestRunSummary testRunSummary, string? value) #

Sets TestRunSummary.GroupLabel: The heading of the group column when the records named groups (for example Product), or null for the built-in word.

Parameters

testRunSummary ConsoleMonster.TestRuns.TestRunSummary required
The instance.
value string? required
The value.

Returns

TestRunSummary The same instance.

Examples

// C# initializer or property         // C# fluent
testRunSummary.GroupLabel = value;    testRunSummary.GroupLabel(value);
public static TestRunSummary MaxFailures(TestRunSummary testRunSummary, int value) #

Sets TestRunSummary.MaxFailures: The most failures listed (default 20), and the most results to investigate; the rest are counted.

Parameters

testRunSummary ConsoleMonster.TestRuns.TestRunSummary required
The instance.
value int required
The value.

Returns

TestRunSummary The same instance.

Examples

// C# initializer or property          // C# fluent
testRunSummary.MaxFailures = value;    testRunSummary.MaxFailures(value);
public static TestRunSummary ReportPath(TestRunSummary testRunSummary, string? value) #

Sets TestRunSummary.ReportPath: The report written for the run (a file path or an http, https or file URL), shown on the last line; a link where the terminal supports links, the plain path otherwise. Null (default) shows no report line.

Parameters

testRunSummary ConsoleMonster.TestRuns.TestRunSummary required
The instance.
value string? required
The value.

Returns

TestRunSummary The same instance.

Examples

// C# initializer or property         // C# fluent
testRunSummary.ReportPath = value;    testRunSummary.ReportPath(value);
public static TestRunSummary ShowFailures(TestRunSummary testRunSummary, bool value = true) #

Sets TestRunSummary.ShowFailures: Whether the failures are listed (default true); off when the test framework already printed them.

Parameters

testRunSummary ConsoleMonster.TestRuns.TestRunSummary required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TestRunSummary The same instance.

Examples

// C# initializer or property           // C# fluent
testRunSummary.ShowFailures = value;    testRunSummary.ShowFailures(value);