Skip to main content

Test Cases & Coverage

A generated suite is only valuable if its cases are precise enough to run and assert against. Logic Assurance produces structured test cases with typed expectations, tracks coverage per artifact, and lets you edit and keep the suites as your source of truth.

The test-case model

Each testable artifact carries its logic type, so you always know which generator produced its suite:

  • Type is flow or block.
  • Logic block type is Formula, DecisionTable, DecisionTree, Validation, or ValidationSet, or empty for flows.

A test case has an identifier, a name, a description, an inputs map, and a typed expectation of what should happen after execution.

Typed expectations

The expectation is what makes a suite executable rather than descriptive. Each test case asserts a precise, typed outcome:

FieldMeaning
BoolResultFor validation blocks: the expected true or false result
OutputsFor action blocks and flows: the expected output values
SavesThe Dataverse writes that should have occurred, as entity, then field, then value
CalledArtifactsThe sub-flows or blocks the logic is expected to invoke

Expected saves are captured as an entity logical name plus a map of fields and values, so a test can assert exactly which record was written and with which values. This is why metadata grounding matters: the saves name real entities and columns, so the assertion is against the true schema.

A worked example

A validation that checks a credit limit might produce cases like:

  • A case with inputs inside the allowed limit, expecting BoolResult true.
  • A case with inputs over the limit, expecting BoolResult false.
  • A boundary case exactly at the limit, expecting the correct result for that edge.

A flow that creates a record would produce cases whose expectation includes a Saves entry naming the target entity and the fields it should set, and a CalledArtifacts entry for any sub-flow it is expected to invoke.

Coverage tracking

For any set of artifacts, Logic Assurance reports how many test cases exist per artifact. The picker shows this coverage at a glance, so you can see which logic has a suite and which does not, and target the gaps rather than regenerating everything. Every artifact is also tagged with its logic type, so you always know which generator produced, or will produce, its suite.

Editable and persisted

Generated suites are stored per artifact and can be fetched, edited, and saved again through the API and the web application. This means a generated suite is a starting point you own, not a throwaway. You can adjust a case, add one the generator missed, and keep the result as the maintained source of truth for that artifact's expected behavior.

Roadmap

Today Logic Assurance authors and persists suites. Execution against Dataverse with pass and fail result tracking is on the roadmap, which will close the loop from generating a suite to running it and reporting results.