Skip to main content

Overview

TestDriver uses EventEmitter2 for its event system. Events use a namespace pattern with colons. They permit wildcard listeners. Use the emitter through testdriver.emitter:

Configuration

The internal emitter is created with:

Wildcard Listeners

Use * to match one level. Use ** to match many levels:

Event Reference

Command Events

Emitted during the execution of SDK commands (click, type, find, etc.).

Step Events

Emitted for each AI reasoning step within a command.

Test Events

Emitted when a test file execution starts.

Log Events

Emitted for all log output from the SDK.

Screen Capture Events

Emitted during screenshot capture.

Sandbox Events

Emitted for sandbox WebSocket lifecycle and communication.

Redraw Events

Emitted during screen stability detection. See Redraw for more details.

File Events

Emitted during file load/save operations in the agent.

Error Events

Emitted for errors at various severity levels.

SDK Events

Emitted for API request lifecycle.

Other Events

Practical Examples

Custom Test Reporter

Progress Monitoring

Debug Logging

Types