Skip to main content

Overview

This template demonstrates how to write both deterministic and non-deterministic tests for aixyz agents using bun:test. It covers unit testing agent configuration, tool registration, and end-to-end agent execution.

Project Structure

Test Pattern

app/agent.test.ts

Key Features

  • Deterministic tests — Validate agent type, tool registration, and config without API calls
  • Non-deterministic tests — Test actual agent execution with test.skipIf for missing API keys
  • Environment loadingloadEnv() from aixyz/test loads .env files for test runs
  • CI-friendly — Deterministic tests always run; non-deterministic tests skip gracefully

Running Tests

Running the Agent