Skip to main content

Overview

Testing is the foundation of developer confidence. In Hive, comprehensive testing confirms three critical things:
  • The agent meets success criteria defined by the goal
  • Constraints are respected under normal and edge inputs
  • Failure and escalation paths behave as expected
  1. Generate or refine tests with the coding agent:
  1. Run focused suites while iterating:
  1. Run goal-based checks before merge:

Common Commands

Run all tests for an agent

Run a single test

Run goal-aware CLI test runner

List generated tests

Debug a failing test

What to Test

Goal Completion

  • Primary success criteria are satisfied
  • Weighted criteria do not regress across releases

Constraints

  • Hard constraints always fail safely
  • Soft constraints emit warnings or fallback behavior

Routing and Retries

  • Conditional edges take the correct branch
  • Retry loops terminate and do not stall the graph

Human-in-the-Loop

  • Pause/resume paths work
  • Timeout and escalation behavior match requirements

CI Example

Best Practices

  • Keep unit-level tests deterministic with mocked tool responses
  • Add regression tests for every production failure you fix
  • Treat constraints as mandatory API contracts, not optional hints
  • Track test coverage across success, failure, retry, and HITL branches
Testing and Debugging: Testing catches issues before production. Once your agent is live, debugging tools help you diagnose and fix issues based on real-world behavior.

Next Steps

Build Your First Agent

Create and export a new agent package

Human-in-the-Loop

Add supervised decision points to sensitive actions

Debugging

Diagnose and fix issues discovered in testing or production

Deployment

Deploy your tested agent to production