MoosicBox HyperChad Simulator
Simulation framework for HyperChad applications using simvar for deterministic testing.
Features
- Simulation Framework: Provides infrastructure for simulating HyperChad applications
- Multi-Renderer Support: Supports HTML, Vanilla JS, egui, and FLTK renderer types
- Test Plan Execution: Integrates with
hyperchad_test_utilsfor test automation - Web Server Simulation: Uses
switchy_web_server_simulatorfor backend mocking - Configuration: Supports app configuration, mock data, and multiple renderers
Note: Renderer simulation implementations are currently placeholders. Full renderer testing capabilities are planned.
Core API
HyperChadSimulator::new()creates a simulator with defaultAppConfigand emptySimulationDatawith_app_config,with_renderer/with_renderers,with_mock_data, andwith_web_serverconfigure simulation inputsrun_test_planexecutes aTestPlanand is available only with thetest-utilsfeaturestart_simulation_serverstarts the configuredSimulationWebServerAppConfig,SimulationData, andRendererTypeare the primary configuration types
Usage
use ;
use ;
// Create simulation data
let simulation_data = SimulationData ;
// Create simulator
let simulator = new
.with_app_config
.with_renderers
.with_mock_data;
// Create test plan
let plan = new
.navigate_to
.fill_form
.click
.wait_for_url;
// Run simulation (requires "test-utils" feature)
let result = simulator.run_test_plan?;
Start a simulation web server:
use Arc;
use ;
# async
Features
Enable the test-utils feature to use TestPlan execution:
[]
= { = "0.1.0", = ["test-utils"] }