API Reference
TestRunView
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.WithCompact
- Extension method TestRunView.WithCompactFailures
- Extension method TestRunView.WithCompactFiles
- Extension method TestRunView.WithTitle
- Method TestRunViewFluent.WithCompact
- Method TestRunViewFluent.WithCompactFailures
- Method TestRunViewFluent.WithCompactFiles
- Method TestRunViewFluent.WithTitle
Accepted by parameters 8
- Extension method TestRunView.WithCompact
- Extension method TestRunView.WithCompactFailures
- Extension method TestRunView.WithCompactFiles
- Extension method TestRunView.WithTitle
- Method TestRunViewFluent.WithCompact
- Method TestRunViewFluent.WithCompactFailures
- Method TestRunViewFluent.WithCompactFiles
- Method TestRunViewFluent.WithTitle
Constructors
public TestRunView(TestRun run) #Creates the view.
Parameters
- run ConsoleMonster.TestRuns.TestRun
- The run.
Methods
public IWidget Build(TestRunSnapshot snapshot, Int32 width, Int32 height, RenderContext context) #IWidgetBuilds 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 System.Int32
- The width.
- height System.Int32
- The height.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
Returns
The dashboard.
public Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #VoidRenders 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 Boolean TryGetTaskbarProgress(out TaskbarState state, out Double fraction) #BooleanThe run for the terminal's indicator: tests done of the total, red once a test failed.
Parameters
- state ConsoleMonster.Output.TaskbarState
- The state.
- fraction System.Double
- The fraction done, or NaN while the total is unknown.
Returns
False once the run passed.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public String? Title { get; set; } #The header title, or null (default) for the built-in word ("Tests" in English).
public Boolean Compact { get; set; } #Draws the compact layout (files, running test, first failures) at the height it needs.
public Int32 CompactFiles { get; set; } #The most file lanes the compact layout shows (default 6).
public Int32 CompactFailures { get; set; } #The most failures the compact layout shows (default 2).
Extension Methods
public static TestRunView WithCompact(TestRunView testRunView, Boolean value = true) #TestRunViewSets TestRunView.Compact: Draws the compact layout (files, running test, first failures) at the height it needs.
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TestRunView WithCompactFailures(TestRunView testRunView, Int32 value) #TestRunViewSets TestRunView.CompactFailures: The most failures the compact layout shows (default 2).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TestRunView WithCompactFiles(TestRunView testRunView, Int32 value) #TestRunViewSets TestRunView.CompactFiles: The most file lanes the compact layout shows (default 6).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TestRunView WithTitle(TestRunView testRunView, String? value) #TestRunViewSets TestRunView.Title: The header title, or null (default) for the built-in word ("Tests" in English).
Parameters
- testRunView ConsoleMonster.TestRuns.TestRunView
- The instance.
- value System.String?
- The value.
Returns
The same instance.