@elizaos/core v1.0.0-beta.51 / TestCase
Interface: TestCase
Represents a test case for evaluating agent or plugin functionality.
Each test case has a name and a function that contains the test logic.
The test function receives the IAgentRuntime
instance, allowing it to interact with the agent's capabilities.
Test cases are typically grouped into TestSuite
s.
Properties​
name​
name:
string
A descriptive name for the test case, e.g., "should respond to greetings".
Defined in​
packages/core/src/types.ts:1378
fn()​
fn: (
runtime
) =>void
|Promise
<void
>
The function that executes the test logic. It can be synchronous or asynchronous.
It receives the IAgentRuntime
to interact with the agent and its services.
The function should typically contain assertions to verify expected outcomes.
Parameters​
• runtime: IAgentRuntime
Returns​
void
| Promise
<void
>