# ImGuiTestHarness Quick Start Guide **Last Updated**: October 2, 2025 **Status**: IT-01 Phase 3 Complete ✅ ## Overview The ImGuiTestHarness provides a gRPC service for automated GUI testing and AI-driven workflows. This guide shows you how to quickly get started with testing YAZE through remote procedure calls. ## Prerequisites ```bash # Install grpcurl (for testing) brew install grpcurl # Build YAZE with gRPC support cd /Users/scawful/Code/yaze cmake -B build-grpc-test -DYAZE_WITH_GRPC=ON cmake --build build-grpc-test --target yaze -j$(sysctl -n hw.ncpu) ``` ## Quick Start ### 1. Start YAZE with Test Harness ```bash ./build-grpc-test/bin/yaze.app/Contents/MacOS/yaze \ --enable_test_harness \ --test_harness_port=50052 \ --rom_file=assets/zelda3.sfc & ``` **Output**: ``` ✓ ImGuiTestHarness gRPC server listening on 0.0.0.0:50052 (with TestManager integration) Use 'grpcurl -plaintext -d '{"message":"test"}' 0.0.0.0:50052 yaze.test.ImGuiTestHarness/Ping' to test ``` ### 2. Run Automated Test Script ```bash ./scripts/test_harness_e2e.sh ``` This will test all RPC methods and report pass/fail status. ### 3. Manual Testing Test individual RPCs with grpcurl: ```bash # Health check grpcurl -plaintext -import-path src/app/core/proto -proto imgui_test_harness.proto \ -d '{"message":"Hello"}' 127.0.0.1:50052 yaze.test.ImGuiTestHarness/Ping # Click button grpcurl -plaintext -import-path src/app/core/proto -proto imgui_test_harness.proto \ -d '{"target":"button:Overworld","type":"LEFT"}' \ 127.0.0.1:50052 yaze.test.ImGuiTestHarness/Click # Type text grpcurl -plaintext -import-path src/app/core/proto -proto imgui_test_harness.proto \ -d '{"target":"input:Search","text":"tile16","clear_first":true}' \ 127.0.0.1:50052 yaze.test.ImGuiTestHarness/Type # Wait for window grpcurl -plaintext -import-path src/app/core/proto -proto imgui_test_harness.proto \ -d '{"condition":"window_visible:Overworld Editor","timeout_ms":5000}' \ 127.0.0.1:50052 yaze.test.ImGuiTestHarness/Wait # Assert state grpcurl -plaintext -import-path src/app/core/proto -proto imgui_test_harness.proto \ -d '{"condition":"visible:Main Window"}' \ 127.0.0.1:50052 yaze.test.ImGuiTestHarness/Assert ``` ## RPC Reference ### Ping - Health Check **Purpose**: Verify service is running and get version info **Request**: ```json { "message": "test" } ``` **Response**: ```json { "message": "Pong: test", "timestampMs": "1696262400000", "yazeVersion": "0.3.2" } ``` ### Click - GUI Interaction **Purpose**: Click buttons, menu items, and other interactive elements **Request**: ```json { "target": "button:Open ROM", "type": "LEFT" } ``` **Target Format**: `: