TestRunView
ConsoleMonster.TestRuns
The live view of a TestRun, drawn with the shared dashboard chrome (see Docs/Design-System.md): the header bar with the run totals, the status and the clock; the test files as lanes (running, passed, failed and skipped counts); the running test; and, in the full layout, the failures (expected against actual, file and line as a link), the slowest tests and a histogram of test durations. The compact layout (for inline areas) keeps the files, the running test and the first failures. Each frame renders a fresh snapshot, so the run can be fed from any thread.
Inheritance
- object
- TestRunView
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.
Returned or exposed by 8
- Extension method TestRunView.Compact
- Extension method TestRunView.CompactFailures
- Extension method TestRunView.CompactFiles
- Extension method TestRunView.Title
- Method TestRunViewFluent.Compact
- Method TestRunViewFluent.CompactFailures
- Method TestRunViewFluent.CompactFiles
- Method TestRunViewFluent.Title
Accepted by parameters 8
- Extension method TestRunView.Compact
- Extension method TestRunView.CompactFailures
- Extension method TestRunView.CompactFiles
- Extension method TestRunView.Title
- Method TestRunViewFluent.Compact
- Method TestRunViewFluent.CompactFailures
- Method TestRunViewFluent.CompactFiles
- Method TestRunViewFluent.Title
Constructors
public TestRunView(TestRun run) #Creates the view.
Parameters
- run ConsoleMonster.TestRuns.TestRun
- The run.
Methods
public IWidget Build(TestRunSnapshot snapshot, int width, int height, RenderContext context) #Builds the widgets for one snapshot at a size (used for each frame and for exports of the final state).
Parameters
- snapshot ConsoleMonster.TestRuns.TestRunSnapshot
- The snapshot.
- width int
- The width.
- height int
- The height.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
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
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public bool TryGetTaskbarProgress(out TaskbarState state, out double fraction) #The run for the terminal's indicator: tests done of the total, red once a test failed.
Parameters
- state ConsoleMonster.Output.TaskbarState
- The state.
- fraction double
- The fraction done, or NaN while the total is unknown.
Returns
bool False once the run passed.Inherited Methods
Properties
public string? Title { get; set; } #The header title, or null (default) for the built-in word ("Tests" in English).
public bool Compact { get; set; } #Draws the compact layout (files, running test, first failures) at the height it needs.
public int CompactFiles { get; set; } #The most file lanes the compact layout shows (default 6).
public int CompactFailures { get; set; } #The most failures the compact layout shows (default 2).
Extension Methods
public static TestRunView Compact(TestRunView testRunView, bool value = true) #Sets TestRunView.Compact: Draws the compact layout (files, running test, first failures) at the height it needs.
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
testRunView.Compact = value; testRunView.Compact(value);public static TestRunView CompactFailures(TestRunView testRunView, int value) #Sets TestRunView.CompactFailures: The most failures the compact layout shows (default 2).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
testRunView.CompactFailures = value; testRunView.CompactFailures(value);public static TestRunView CompactFiles(TestRunView testRunView, int value) #Sets TestRunView.CompactFiles: The most file lanes the compact layout shows (default 6).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
testRunView.CompactFiles = value; testRunView.CompactFiles(value);public static TestRunView Title(TestRunView testRunView, string? value) #Sets TestRunView.Title: The header title, or null (default) for the built-in word ("Tests" in English).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRunView.Title = value; testRunView.Title(value);