Deterministic constrained combinatorial test matrix generator for MoonBit.
fn CasePattern::matches(self : CasePattern, model : Model, test_case : TestCase) -> Result[Bool, CaseWeaveError]fn CasePattern::to_case(self : CasePattern, model : Model, line_no? : Int) -> Result[TestCase, CaseWeaveError]fn CasePattern::to_exclusion_constraint(self : CasePattern, label : String) -> Result[Constraint, CaseWeaveError]pub(all) enum CaseWeaveError {
EmptyModel
EmptyParameterName(Int)
DuplicateParameter(String)
EmptyValues(String)
EmptyValue(String, Int)
DuplicateValue(String, String)
InvalidStrength(Int, Int)
InvalidCandidateLimit(Int)
InvalidSuggestionLimit(Int)
CandidateLimitExceeded(Int)
NoValidCases
UncoverableInteraction
ParseError(Int, String)
UnknownParameter(String)
UnknownValue(String, String)
InvalidCaseWidth(Int, Int)
InvalidCaseValue(String, String)
ConstraintViolation(Int, String)
} derive(Eq, Debug)fn Constraint::matches(self : Constraint, model : Model, test_case : TestCase) -> Result[Bool, CaseWeaveError]pub(all) enum ConstraintExpr {
Equal(String, String)
NotEqual(String, String)
OneOf(String, Array[String])
NoneOf(String, Array[String])
And(ConstraintExpr, ConstraintExpr)
Or(ConstraintExpr, ConstraintExpr)
Implies(ConstraintExpr, ConstraintExpr)
Not(ConstraintExpr)
Always
Never
} derive(Eq, Debug)pub(all) struct CoverageReport {
strength : Int
case_count : Int
total_interactions : Int
covered_interactions : Int
coverage_percent : Double
missing : Array[MissingInteraction]
} derive(Debug)pub(all) struct GateReport {
passed : Bool
failures : Array[GateFailure]
warnings : Array[SpecWarning]
coverage : CoverageReport
case_count : Int
top_risk_score : Int
positive_risk_cases : Int
}pub(all) struct InteractionRisk {
pattern : CasePattern
weight : Int
note : String
} derive(Eq, Debug)pub(all) struct RepairGate {
require_complete : Bool
max_additions : Int
max_final_missing : Int
min_largest_gain : Int
}pub(all) struct RepairGateFailure {
kind : RepairGateFailureKind
message : String
} derive(Eq, Debug)pub(all) struct RepairGateReport {
passed : Bool
failures : Array[RepairGateFailure]
additions : Int
initial_missing : Int
final_missing : Int
largest_gain : Int
complete : Bool
}pub(all) struct RepairOptions {
strength : Int
max_candidates : Int
max_suggestions : Int
}fn RepairOptions::from_generation(options : GenerationOptions, max_suggestions? : Int) -> RepairOptionspub(all) struct RepairPlan {
model : Model
original_cases : Array[TestCase]
additions : Array[TestCase]
merged_cases : Array[TestCase]
original_report : CoverageReport
final_report : CoverageReport
steps : Array[RepairStep]
complete : Bool
initial_missing : Int
final_missing : Int
}pub(all) struct ScenarioGate {
require_complete_coverage : Bool
max_missing_interactions : Int
min_cases : Int
max_cases : Int
min_top_risk_score : Int
min_positive_risk_cases : Int
allow_warnings : Bool
}fn ScenarioGate::with_risk_floor(min_top_risk_score : Int, min_positive_risk_cases : Int) -> ScenarioGatepub(all) struct ScenarioRun {
spec_name : String
model : Model
suite : Suite
cases : Array[TestCase]
included_case_count : Int
coverage : CoverageReport
ranked_cases : Array[RankedCase]
}fn ScenarioRun::evaluate_gate(self : ScenarioRun, spec : ScenarioSpec, gate? : ScenarioGate) -> GateReportfn ScenarioRun::evaluate_normalized_gate(self : ScenarioRun, spec : ScenarioSpec, gate : ScenarioGate) -> GateReportpub(all) struct ScenarioSpec {
name : String
model : Model
constraints : Array[Constraint]
options : GenerationOptions
included_cases : Array[TestCase]
excluded_patterns : Array[CasePattern]
value_risks : Array[ValueRisk]
interaction_risks : Array[InteractionRisk]
}fn ScenarioSpec::plan_repair(self : ScenarioSpec, cases : Array[TestCase], options? : RepairOptions) -> Result[RepairPlan, CaseWeaveError]fn ScenarioSpec::rank_cases(self : ScenarioSpec, cases : Array[TestCase]) -> Result[Array[RankedCase], CaseWeaveError]fn ScenarioSpec::score_case(self : ScenarioSpec, test_case : TestCase) -> Result[CaseRisk, CaseWeaveError]fn audit(model : Model, cases : Array[TestCase], strength? : Int, constraints? : Array[Constraint], max_candidates? : Int) -> Result[CoverageReport, CaseWeaveError]fn generate(model : Model, constraints? : Array[Constraint], options? : GenerationOptions) -> Result[Suite, CaseWeaveError]fn plan_repair(model : Model, cases : Array[TestCase], constraints? : Array[Constraint], options? : RepairOptions) -> Result[RepairPlan, CaseWeaveError]let version : StringDeterministic constrained combinatorial test matrix generator for MoonBit.