NewOpenAgents/context/development/ai/mastra-ai/guides/testing.md
cclohmar 0764127e46 chore: extract OpenAgents Control (OAC) with local customizations
Snapshot of the installed OAC framework (/app/.opencode) including Claus's custom agents:
- agent/OpenArchitect.md (Aiden, the architect)
- agent/subagents/openagent.md (GMS sub-agent builder)
- agent/core/openagent.md, agent/core/opencoder.md (customized)
- agent/subagents/{code,core,development,system-builder}/*
- command/, context/, skills/, tool/, README.md, env.example

Excluded runtime artifacts: node_modules/, bin/opencode (184MB binary), lockfiles.
2026-10-12 08:24:00 +00:00

1.1 KiB

Guide: Testing Mastra

Purpose: How to run and validate Mastra components in this project.

Last Updated: 2026-01-09


Core Idea

Testing in this project is divided into tool-level tests and full workflow integration tests. Use the provided npm scripts for rapid validation.

Key Points

  • Tool Tests: Validate individual tools in isolation (e.g., npm run test:playbook).
  • Workflow Tests: Run full end-to-end scenarios (e.g., npm run test:workflow).
  • Baseline Tests: Compare current performance against a known baseline (npm run test:baseline).
  • Observability: Use npm run traces after tests to inspect the execution details in the database.

Quick Example

# Test a specific tool
npm run test:calculator

# Run full validity workflow
npm run validity:workflow

# View results of the last run
npm run traces

Reference: package.json scripts, scripts/ directory Related:

  • concepts/core.md
  • lookup/mastra-config.md