1.9 KiB
1.9 KiB
Specification: Live GUI Testing Infrastructure
Overview
Update the testing suite to ensure all tests (especially GUI-related and integration tests) communicate with a live running instance of gui.py started with the --enable-test-hooks argument. This ensures that tests can verify the actual application state and metrics via the built-in API hooks.
Functional Requirements
- Server-Based Testing: All tests must be updated to interact with the application through its REST API hooks rather than mocking internal components where live verification is possible.
- Automated GUI Management: Implement a robust mechanism (preferably a pytest fixture) to start
gui.py --enable-test-hooksbefore test execution and ensure it is cleanly terminated after tests complete. - Hook Client Integration: Ensure
api_hook_client.pyis the primary interface for tests to communicate with the running GUI. - Documentation Alignment: Update
conductor/workflow.mdto reflect the requirement for live testing and API hook verification.
Non-Functional Requirements
- Reliability: The process of starting and stopping the GUI must be stable and not leave orphaned processes.
- Speed: The setup/teardown of the live GUI should be optimized to minimize test suite overhead.
- Observability: Tests should log communication with the API hooks for easier debugging.
Acceptance Criteria
- All tests in the
tests/directory pass when executed against a livegui.pyinstance. - New track creation (e.g., via
/conductor:newTrack) generates plans that include specific API hook verification tasks. conductor/workflow.mdaccurately describes the live testing protocol.- Real-time UI metrics (FPS, CPU, etc.) are successfully retrieved and verified in at least one performance test.
Out of Scope
- Rewriting the entire GUI framework.
- Implementing new API hooks not required for existing test verification.