Skip to content

Workflow & Agent Testing

Document ID: TEST-003
File Path: docs/15-testing/workflow-tests.md
Version: 1.0.0
Status: Draft
Owner: Quality Engineering Team
Last Updated: 2026-06-27


This document defines end-to-end behavioral testing of workflows and agents — verifying that authored definitions produce correct outcomes across the full runtime, including durability, retries, compensation, and agent reasoning.


LevelVerifies
DefinitionDSL validates and compiles (validation rules)
ExecutionCorrect path, outputs, and state transitions
DurabilitySurvives restart via checkpointing
ResilienceRetry and compensation behave

Because execution is deterministic, tests replay an execution from its event history and assert identical state — catching non-determinism and validating checkpoint/resume.

Tests use a fake clock to fast-forward timers and inject events/signals to drive waits, rather than waiting in real time.


Run an agent against fixed inputs with a fake provider returning scripted model responses, asserting the agent plans, calls the right tools, and produces expected output.

Tests assert on the run trace: planner steps, tool calls and arguments, and memory reads — verifying how the agent reached its answer, not just the final text.

  • Tools can run as deterministic stubs or in the real Tool Runtime sandbox.
  • Memory is seeded with fixtures so retrieval is reproducible.

Beyond pass/fail, agents are evaluated for quality:

  • Test cases with golden outputs or rubric-based grading.
  • Version-over-version comparison (quality, cost, latency) in Agent Studio.
  • Regression gates: a new agent/prompt version must not regress key metrics.

LLM-as-judge grading uses a pinned judge model via the LLM Gateway for repeatability.


Curated suites of representative workflows and agent scenarios run in CI as snapshots; intentional output changes update the snapshot under review.


Tests drive human tasks programmatically (approve/reject) to cover suspended/resumed paths and separation-of-duties rules.


A core set runs per PR; broader evaluation suites run nightly (they can be slower and cost provider tokens where live models are used).




VersionDateDescription
1.0.02026-06-27Initial Workflow & Agent Testing specification