---
title: "Testing and Verification | Agent Barn"
canonical: "https://agentbarn.dev/guides/testing-and-verification"
pubDate: "2026-08-25T00:00:00.000Z"
updatedDate: "2026-08-29T16:41:32.000Z"
author: Agent Barn
description: "Select API, UI, runtime, migration, Kubernetes, and documentation checks that prove the changed contract."
tags: [Engineering guide, All contributors, Agent Barn]
categories: [Guides]
---

# Testing and Verification

Changed behavior needs the lowest reliable coverage plus authentication, authorization, validation, not-found, and conflict cases where relevant. Widen verification only when the contract depends on the wider environment.

## Guide details

- Reference: GD-15
- Type: Engineering guide
- Audience: All contributors

## API coverage

Integration tests use the real `FastAPI` app and migrated PostgreSQL with additive dependency overrides. Follow the Given/When/Then helpers, use `Hamcrest` matchers, and keep each test focused on one behavior. Add unit tests for services, repositories, parsers, builders, and adapters when HTTP composition is not the contract.

## Runtime plugin coverage

Drive the Hermes and OpenClaw plugins from their source paths and assert the payload they post against the real Ingest models. Runtime-dependent assumptions also need contract checks inside the pinned images. Missing Node is a failure for OpenClaw plugin tests, not a skip.

## UI coverage

`Playwright` specs own assertions, page objects own stable interactions and selectors, data-support helpers own interception, and fixtures own static responses. Prefer accessible roles and labels over test IDs. Update `Zod` schemas, hooks, mocks, and browser expectations together.

## Commands and failure handling

Use the repository Make targets for API checks/tests, UI lint/typecheck/`Playwright`, Kubernetes integration, coverage, and monitoring checks. Documentation-only work needs link, path, format, and production-build validation. Report unrelated existing failures exactly rather than modifying unrelated code.
