Testing

Testing

Test Anvia workflows without hiding application policy.

Anvia workflows are easiest to test when product code keeps clear boundaries: tools own side effects, agents own model behavior, pipelines own workflow shape, and the application wrapper owns persistence, logging, and error handling.

Use focused tests at each boundary before adding broad provider integration tests.

Testing Map

BoundaryWhat to testPage
Toolsinput validation, expected product states, permission failures, output shapeTools and Pipelines
Pipelinesdeterministic step output, composition, batch behavior, concurrency limitsTools and Pipelines
Agent wrappershistory persistence, trace metadata, usage records, runtime limits, known errorsAgents and Retrieval
Retrievalembedding selectors, metadata filters, result ordering, dynamic context formattingAgents and Retrieval
Evalsrepeatable quality checks for functions, agents, and traced workflowsEvals
Studioregistration, HTTP run shape, sessions, traces, approvals, questionsStudio and Providers
Providersone narrow happy path per provider and the behavior your workflow depends onStudio and Providers

Practical Rule

Most application correctness should be covered before a provider call is made. Use provider tests to verify integration behavior, not every branch of product policy.

Start Here

  1. Test tools and deterministic pipeline steps first.
  2. Test application wrappers around agents.
  3. Test retrieval filters without a model.
  4. Use Studio .fetch(...) for local runtime wiring.
  5. Keep provider integration tests narrow and explicit.