TestimoX

API Reference

Class

ReportViewBuilder

Namespace TestimoX.Testing
Assembly TestimoX
Modifiers sealed

Helper to shape HTML report views without changing rule code. Lets you add summary fields and counters, define sections (including filtered/conditional ones), and highlight rows or values. Works with both object graphs and root lists via the special "$" path.

Inheritance

  • Object
  • ReportViewBuilder

Examples


// Build a view with summary fields, a filtered section, and highlights
var view = new ReportViewBuilder()
  // top chips
  .SummaryField("Total DCs", "$.Count")
  .SummaryCountWhere("Stopped services", "$", "Status", "Stopped")
  // main section
  .Section("Domain Controllers", "DomainControllers", ViewMode.Table)
  // filtered section: high CPU rows
  .SectionWhereGreaterThan("High CPU", "DomainControllers", "CpuPercent", 90, ViewMode.Table)
  // highlight values in the last section
  .HighlightLastSectionOp("CpuPercent", FilterOperator.GreaterThan, 90, HighlightColor.Red)
  .HighlightLastSectionBool("IsPdc", HighlightColor.Blue, HighlightColor.Gray, HighlightTarget.Cell);

        

Constructors

Methods

public ReportViewBuilder DescriptionLastSection(String text) #
Returns: ReportViewBuilder

Adds a description to the most recently added section. Renderers show it above the section’s content. Supports parameter replacement for rule parameters (e.g., "≤ {DomainAdminsMax}").

Parameters

text System.String requiredposition: 0
public ReportViewBuilder HighlightLastSection(String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Adds a simple equals-based highlight rule to the most recently added section.

Parameters

column System.String requiredposition: 0
equalsValue System.String requiredposition: 1
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 2
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 3
public ReportViewBuilder HighlightLastSectionBetweenParameter(String column, String minParameterKey, String maxParameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Highlights rows where Parameter(minParameterKey) ≤ column ≤ Parameter(maxParameterKey).

Parameters

column System.String requiredposition: 0
minParameterKey System.String requiredposition: 1
maxParameterKey System.String requiredposition: 2
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 3
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 4
public ReportViewBuilder HighlightLastSectionBool(String column, HighlightColor whenTrue, HighlightColor whenFalse, HighlightTarget target = Cell) #
Returns: ReportViewBuilder

Convenience helper for boolean columns: apply one color when true and another when false. Implemented as two operator-based rules to preserve nulls as unstyled.

Parameters

column System.String requiredposition: 0
whenTrue TestimoX.Definitions.HighlightColor requiredposition: 1
whenFalse TestimoX.Definitions.HighlightColor requiredposition: 2
target TestimoX.Definitions.HighlightTarget = Cell optionalposition: 3
public ReportViewBuilder HighlightLastSectionGreaterThanOrEqualParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Highlights rows where column ≥ Parameter(parameterKey).

Parameters

column System.String requiredposition: 0
parameterKey System.String requiredposition: 1
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 2
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 3
public ReportViewBuilder HighlightLastSectionGreaterThanParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Highlights rows where column > Parameter(parameterKey).

Parameters

column System.String requiredposition: 0
parameterKey System.String requiredposition: 1
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 2
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 3
public ReportViewBuilder HighlightLastSectionLessThanOrEqualParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Highlights rows where column ≤ Parameter(parameterKey).

Parameters

column System.String requiredposition: 0
parameterKey System.String requiredposition: 1
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 2
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 3
public ReportViewBuilder HighlightLastSectionNotEquals(String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Adds a highlight rule to the most recently added section: highlight rows where column ≠ equalsValue.

Parameters

column System.String requiredposition: 0
equalsValue System.String requiredposition: 1
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 2
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 3
public ReportViewBuilder HighlightLastSectionOp(String column, FilterOperator op, Object value, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Adds an operator-based highlight rule to the most recent section, comparing column with value using op.

Parameters

column System.String requiredposition: 0
op TestimoX.Definitions.FilterOperator requiredposition: 1
value System.Object requiredposition: 2
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 3
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 4
public ReportViewBuilder HighlightSection(String path, String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #
Returns: ReportViewBuilder

Adds a highlight rule to the most recent section matching the given path. Useful when multiple sections are added and ordering would make HighlightLastSection ambiguous.

Parameters

path System.String requiredposition: 0
column System.String requiredposition: 1
equalsValue System.String requiredposition: 2
color TestimoX.Definitions.HighlightColor = Yellow optionalposition: 3
target TestimoX.Definitions.HighlightTarget = Row optionalposition: 4
public ReportViewBuilder LegendLastSection(String text) #
Returns: ReportViewBuilder

Adds a small legend/note under the most recently added section. Text supports parameter replacement for rule parameters, e.g. "≤ {DomainAdminsMax}".

Parameters

text System.String requiredposition: 0
public ReportViewBuilder NoStandardHighlights() #
Returns: ReportViewBuilder

Disables the global Status/Success table highlighters for the most recently added section. Use when a section has its own explicit per-cell highlights and enum values like "Enabled" should not be recolored.

public ReportViewBuilder Section(String title, String path, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a report section rendering the value at path. Use "$" to target the rule's results collection (root) when the source returns a list directly. For anchored properties on a wrapper object (e.g., a property named "Servers"), pass "Servers".

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 2
maxRows System.Nullable{System.Int32} = null optionalposition: 3
public ReportViewBuilder SectionDescription(String path, String text) #
Returns: ReportViewBuilder

Sets a description for the section targeting path.

Parameters

path System.String requiredposition: 0
text System.String requiredposition: 1
public ReportViewBuilder SectionIfNotEmpty(String title, String path, ViewMode mode = Auto, Nullable<Int32> maxRows = null, Boolean countEvenIfZero = false) #
Returns: ReportViewBuilder

Adds a section that is only rendered when the value at path is a non-empty enumerable. Optionally contributes a zero-valued counter to the Summary breakdown even when empty.

Parameters

title System.String requiredposition: 0
Section title.
path System.String requiredposition: 1
Property path or "$" for the root collection.
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 2
Rendering mode.
maxRows System.Nullable{System.Int32} = null optionalposition: 3
Optional maximum rows to render.
countEvenIfZero System.Boolean = false optionalposition: 4
When true, the section will be listed in the Summary breakdown counters even if the resolved collection is empty (count = 0).
public ReportViewBuilder SectionLegend(String path, String text) #
Returns: ReportViewBuilder

Sets a legend/note for the section targeting path.

Parameters

path System.String requiredposition: 0
text System.String requiredposition: 1
public ReportViewBuilder SectionResults(String title, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a section that targets the overall results collection (for rules that return a list directly). Equivalent to Section(title, "$", ...).

Parameters

title System.String requiredposition: 0
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 1
maxRows System.Nullable{System.Int32} = null optionalposition: 2
public ReportViewBuilder SectionWhere(String title, String path, String filterProperty, Object equalsValue, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps only items where filterProperty equals equalsValue. Values are matched loosely (bool/number/string). Path may point to a collection property (e.g., "Servers") or to "$" for the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
Section title.
path System.String requiredposition: 1
Property path or "$" for the root collection.
filterProperty System.String requiredposition: 2
Property name to compare.
equalsValue System.Object requiredposition: 3
Value to match.
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
Rendering mode hint.
maxRows System.Nullable{System.Int32} = null optionalposition: 5
Optional maximum rows to render.
public ReportViewBuilder SectionWhereBetweenParameter(String title, String path, String filterProperty, String minParameterKey, String maxParameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps only items where filterProperty is between two rule parameters (inclusive). Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
minParameterKey System.String requiredposition: 3
maxParameterKey System.String requiredposition: 4
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 5
maxRows System.Nullable{System.Int32} = null optionalposition: 6
public ReportViewBuilder SectionWhereGreaterThan(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps items where filterProperty > value.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
value System.Object requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereGreaterThanOrEqual(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps items where filterProperty ≥ value.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
value System.Object requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereGreaterThanOrEqualParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section using a parameter value. Keeps items where filterProperty ≥ value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
parameterKey System.String requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereGreaterThanParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section using a parameter value. Keeps items where filterProperty > value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
parameterKey System.String requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereIn(String title, String path, String filterProperty, Object values, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section using a membership list. Keeps items where filterProperty is in values. values can be an IEnumerable or a ParameterRef that resolves to an array/list. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
values System.Object requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereLessThan(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps items where filterProperty < value. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
value System.Object requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereLessThanOrEqual(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section that keeps items where filterProperty ≤ value.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
value System.Object requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereLessThanOrEqualParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section using a parameter value. Keeps items where filterProperty ≤ value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
parameterKey System.String requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SectionWhereLessThanParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #
Returns: ReportViewBuilder

Adds a filtered section using a parameter value. Keeps items where filterProperty < value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
filterProperty System.String requiredposition: 2
parameterKey System.String requiredposition: 3
mode TestimoX.Definitions.ViewMode = Auto optionalposition: 4
maxRows System.Nullable{System.Int32} = null optionalposition: 5
public ReportViewBuilder SummaryCountWhere(String title, String path, String filterProperty, Object equalsValue) #
Returns: ReportViewBuilder

Adds a computed counter that counts items at path where filterProperty equals equalsValue.

Parameters

title System.String requiredposition: 0
Counter title.
path System.String requiredposition: 1
Collection property path or "$" for the results root.
filterProperty System.String requiredposition: 2
Property name to compare.
equalsValue System.Object requiredposition: 3
Value to match.
public ReportViewBuilder SummaryCountWhereInAndEqualsParameter(String title, String path, String inProperty, String listParameterKey, String filterProperty, Object equalsValue) #
Returns: ReportViewBuilder

Adds a computed counter that counts items at path where (inProperty IN values of rule parameter listParameterKey) AND (filterProperty equals equalsValue).

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
inProperty System.String requiredposition: 2
listParameterKey System.String requiredposition: 3
filterProperty System.String requiredposition: 4
equalsValue System.Object requiredposition: 5
public ReportViewBuilder SummaryField(String title, String path) #
Returns: ReportViewBuilder

Adds a single summary field with a friendly title. Path may be a nested property (e.g., "Servers.Count"). Use "$" to target the rule's results collection (root) when the source returns a list directly. Example: SummaryField("Total DCs", "$")

Parameters

title System.String requiredposition: 0
path System.String requiredposition: 1
public ReportViewBuilder SummaryFields(params String[] paths) #
Returns: ReportViewBuilder

Adds raw summary fields by property path. Use "$" as the path to target the rule's results collection (root) when the source returns a list directly. For anchored properties (e.g., an object with a property named "Servers"), pass "Servers.Count".

Parameters

paths System.String[] requiredposition: 0
public ReportViewBuilder SummaryParameter(String title, String parameterKey) #
Returns: ReportViewBuilder

Adds a summary item that displays the value of a rule parameter.

Parameters

title System.String requiredposition: 0
parameterKey System.String requiredposition: 1