TestimoX

API Reference

Class

RuleComplete

Namespace TestimoX.Definitions
Assembly TestimoX

Rich, per‑rule execution result used across exporters and UIs. Includes raw and filtered result sets, test outcomes, host telemetry (CPU/memory/time), and convenience counters to compute overall status quickly.

Inheritance

  • Object
  • RuleComplete

Constructors

public RuleComplete(Rule rule) #

Creates a new RuleComplete wrapper for the specified rule and initializes collections.

Parameters

rule TestimoX.Definitions.Rule requiredposition: 0
The rule being executed.

Methods

public async Task ExecuteScriptAsync(RuleParameters parameters, CancellationToken cancellationToken) #
Returns: Task

Executes the rule’s PowerShell source using the execution pipeline, capturing output, telemetry, and errors.

Parameters

parameters TestimoX.Execution.RuleParameters requiredposition: 0
Bound rule parameters and environment routing hints.
cancellationToken System.Threading.CancellationToken requiredposition: 1
Cancellation token for cooperative cancel.
public Task ExecuteTestsAsync(CancellationToken cancellationToken) #
Returns: Task

Executes all enabled tests against the current result set, producing TestResults and per‑test filtered outputs. Honors engine verbosity for progress messages.

Parameters

cancellationToken System.Threading.CancellationToken requiredposition: 0
Cancellation token for cooperative cancel.
FormatFriendlyMessage(System.String arg1, System.Object arg2, System.Object arg3) #

Formats a friendly message template by replacing well‑known tokens and parameter placeholders. Supports {Actual}, {Expected}, and rule source parameters (e.g., {CertExpirySoonDays}).

Parameters

arg1 System.String required
arg2 System.Object required
arg3 System.Object required
GetWorstStatus(System.Collections.Generic.IEnumerable{TestimoX.Definitions.TestimoStatus} arg1) #

Determines the worst (highest severity) status from a collection of statuses

Parameters

arg1 System.Collections.Generic.IEnumerable{TestimoX.Definitions.TestimoStatus} required
SanitizeForMessage(System.String arg1) #

Basic output sanitizer for test messages: removes control characters (except TAB/CR/LF) and clamps length to avoid log/report flooding. Not HTML encoding — HTML renderer is responsible for escaping where needed.

Parameters

arg1 System.String required

Properties

public Rule Rule { get; set; } #

Details about the rule which was executed

public PSDataCollection<PSObject> Results { get; set; } #

Contains the results of the script execution (PSObjects for PowerShell compatibility)

public IEnumerable<Object> ResultsRaw { get; set; } #

Contains the raw results from method execution (supports both PSObject and native C# objects)

public List<Object> ExcludedResultsRaw { get; set; } #

Items excluded by policy (shown in report, not counted in tests).

public List<TestResult> TestResults { get; set; } #

Contains the results of the tests executed on the script results

public TestResult TestResultsSource { get; set; } #

Contains the results of test executed on the script results This is a single test result, that is used to determine if the script execution was successful and whether following tests should be executed

public List<String> PowerShellInformation { get; set; } #

Informational messages produced by the rule’s PowerShell execution (if used).

public List<String> PowerShellWarnings { get; set; } #

Warning messages produced by the rule’s PowerShell execution (surface in summaries).

public List<String> PowerShellErrors { get; set; } #

Error messages produced by the rule’s PowerShell execution (included in totals).

public String Forest { get; set; } #

Forest name (when applicable for the rule scope).

public String Domain { get; set; } #

Domain DNS name (when applicable for the rule scope).

public String DomainController { get; set; } #

Domain controller name (when applicable for the rule scope).

public Int32 TaskNumber { get; set; } #

Stable task id used in progress renderers.

public TimeSpan ExecutionTime { get; set; } #

Wall‑clock execution time for the rule.

public Boolean Success { get; } #

Gets whether all tests passed successfully

public String RuleName { get; } #

Gets the name of the rule

public List<TestResult> FailedTests { get; } #

Gets the list of failed tests

public String ExecutionTimeFormatted { get; } #

Wall‑clock execution time formatted as a constant (c) timespan.

public TimeSpan CpuTime { get; set; } #

Approximate CPU time spent (if measured by the host).

public String CpuTimeFormatted { get; } #

CPU time formatted as a constant (c) timespan.

public Int64 MemoryUsage { get; set; } #

Peak memory footprint captured during execution (bytes).

public String MemoryUsageFormatted { get; } #

Peak memory usage formatted as a human‑readable byte size.

public PSDataCollection<PSObject> ResultsFiltered { get; set; } #

Filtered results for PowerShell compatibility

public IEnumerable<Object> ResultsFilteredRaw { get; set; } #

Filtered results for native C# objects.

public FilteredResults ProcessedResults { get; set; } #

Structured snapshot of filter expressions applied to the results.

public Dictionary<String, PSDataCollection<PSObject>> TestResultsFiltered { get; set; } #

Per‑test filtered results (PowerShell friendly) keyed by test name.

public Dictionary<String, IEnumerable<Object>> TestResultsFilteredRaw { get; set; } #

Per‑test filtered results (native C#) keyed by test name.

public Int32 TotalTests { get; } #

Total number of tests defined for this rule.

public Int32 TotalFailures { get; } #

Number of tests that failed (Success == false).

public Int32 TotalSuccess { get; } #

Number of tests that passed (Success == true).

public RuleParameters ExecutionParameters { get; set; } #

The exact parameters used to execute this rule instance. Kept for diagnostics and for stable cache fingerprinting so that file-backed reuse honors the original parameter bag (including values in RuleParameters.Additional).

public TestimoStatus OverallStatus { get; } #

Overall rule status based on test results

public String OverallStatusText { get; } #

Gets a human-readable overall status string

public String MessageIntroduction { get; set; } #

Optional introductory text displayed ahead of the rule’s message/details.

public String MessageParameters { get; set; } #

Optional parameterized message segment (often rendered in summaries).