Video Tutorial: Testing Projects and Plugins with elizaOS
This guide builds on concepts from Add Multiple Agents
Step 1: Test multi-agent configuration
We added a bunch of new features to our project. In addition to the default tests that projects ship with, let’s write some new tests to cover our new feature scope:Feature | Test Type | What We’re Validating |
---|---|---|
Multi-agent configuration | Component | Two agents with unique Discord tokens, voice IDs, and plugins |
Multi-agent runtime | E2E | Both agents initialize and run simultaneously |
ElizaOS projects ship with comprehensive built-in tests for core functionality (character config, plugin loading, runtime behavior). For details on the default test structure, see Testing Projects.
Create component tests
Let’s create a new component test file to test the specific multi-agent features we built:src/__tests__/multi-agent-features.test.ts
Step 2: Test runtime functionality
Create e2e tests
Theproject-starter.e2e.ts
file already contains default tests for core functionality (agent initialization, message processing, memory storage). Add these multi-agent specific tests to the existing ProjectStarterTestSuite.tests
array:
src/__tests__/e2e/project-starter.e2e.ts
Step 3: Run and validate tests
Execute your test suite
Terminal