> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Driver contract testing

> Validate a driver's lifecycle and event contract using the testing entrypoint.

Validate a driver's lifecycle and event contract using the testing entrypoint. Read the [driver contract testing guide](/harness/testing) for examples, defaults, and behavior.

These declarations cover every public export in this category. Import from `@agentium/harness/testing`. Types such as `ChatMessage`, `RunContext`, and `ExecutionServices` come from [`@agentium/core`](/api-reference/core). A `?` marks an optional field.

## testDriverContract

```typescript theme={null}
/** No test-framework dependency. Calls the driver once and throws on violated public lifecycle invariants. */
export declare function testDriverContract(driver: ExecutionDriver, config?: Omit<HarnessRuntimeConfig, "driver">): Promise<{
    result: HarnessResult;
    eventCount: number;
}>;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.