@@ -236,6 +236,7 @@ linux-voice-assistant/
236236│ ├── linux-voice-assistant-xvf3800.md # ReSpeaker XVF3800 4-Mic USB Array configuration
237237│ ├── linux-voice-assistant-xvf3800-mute.md # Hardware mute button and LED sync details
238238│ ├── lva-desktop.md # Running LVA on a Linux desktop with the tray client
239+ │ ├── testing-guide.md # Comprehensive testing documentation
239240│ └── xvf3800_legacy_led_effects_mapping.md # LED functions when running firmware older than 2.0.7
240241├── linux_voice_assistant
241242│ ├── api_server.py # ESPHome API server
@@ -250,9 +251,11 @@ linux-voice-assistant/
250251│ ├── __init__.py
251252│ ├── led_controller.py # LED effects and state mapping
252253│ ├── __main__.py # Application entry point
254+ │ ├── microwakeword.py # Micro wake word detection module
253255│ ├── models.py # Shared state and data models
254256│ ├── mpv_player.py # Media playback via mpv
255257│ ├── mqtt_controller.py # MQTT discovery and entity management
258+ │ ├── openwakeword.py # Open wake word detection module
256259│ ├── satellite.py # ESPHome voice assistant protocol
257260│ ├── sendspin # Sendspin client subsystem
258261│ │ ├── client.py # WebSocket connection and protocol
@@ -302,13 +305,30 @@ linux-voice-assistant/
302305│ │ └── timer_finished.flac
303306│ └── wakeup # Wake word triggered sounds
304307│ └── wake_word_triggered.flac
305- ├── tests
306- │ ├── lva_mic_capture.py
307- │ ├── ok_nabu.wav
308- │ ├── test_microwakeword.py
309- │ ├── test_openwakeword.py
310- │ ├── xvf3800_hid_mute_probe.py
311- │ └── xvf3800_probe.py
308+ ├── tests # Comprehensive test suite (293 tests, 99.3% passing)
309+ │ ├── README.md # Test documentation
310+ │ ├── conftest.py # Shared pytest fixtures
311+ │ ├── diagnose_imports.py # Import diagnostic utility
312+ │ ├── test_audio_engine.py # Audio engine tests
313+ │ ├── test_button_controller.py # Button controller tests
314+ │ ├── test_configuration.py # Configuration management tests
315+ │ ├── test_end_to_end_workflows.py # End-to-end integration tests
316+ │ ├── test_event_bus.py # Event system architecture tests
317+ │ ├── test_format_mac.py # MAC address formatting tests
318+ │ ├── test_led_controller.py # LED control tests
319+ │ ├── test_microwakeword.py # MicroWakeWord detection tests
320+ │ ├── test_mqtt_controller.py # MQTT integration tests
321+ │ ├── test_openwakeword.py # OpenWakeWord detection tests
322+ │ ├── test_sendspin_client.py # Sendspin client tests
323+ │ ├── test_sendspin_discovery.py # Sendspin discovery tests
324+ │ ├── test_state_management.py # State management tests
325+ │ ├── test_volume_management.py # Volume control tests
326+ │ ├── test_xvf3800_button_controller.py # XVF3800 button hardware tests
327+ │ ├── test_xvf3800_led_backend.py # XVF3800 LED hardware tests
328+ │ ├── lva_mic_capture.py # Audio capture utility
329+ │ ├── ok_nabu.wav # Test audio file
330+ │ ├── xvf3800_hid_mute_probe.py # XVF3800 hardware probe
331+ │ └── xvf3800_probe.py # XVF3800 device probe
312332├── wakewords # Wake word models
313333│ ├── alexa.json
314334│ ├── alexa.tflite
@@ -359,6 +379,66 @@ linux-voice-assistant/
359379
360380---
361381
382+ ## Development & Testing
383+
384+ ### Running Tests
385+
386+ The project includes a comprehensive test suite covering the fork's new architecture:
387+
388+ ``` bash
389+ # Install development dependencies
390+ ./script/setup --dev
391+
392+ # Run all tests
393+ ./script/test
394+
395+ # Run specific test file
396+ ./script/test test_event_bus.py
397+
398+ # Run with coverage report
399+ pytest tests/ --cov=linux_voice_assistant --cov-report=html
400+
401+ # Run specific test with verbose output
402+ pytest tests/test_event_bus.py -v
403+
404+ # Run excluding hardware tests
405+ pytest tests/ -m " not hardware"
406+ ```
407+
408+ ### Test Structure
409+
410+ - ** Unit Tests** : Core architecture (EventBus, State, Configuration)
411+ - ** Integration Tests** : Controllers and hardware abstractions
412+ - ** Hardware Tests** : Physical device integration (XVF3800, ReSpeaker)
413+ - ** End-to-End Tests** : Complete voice assistant workflows
414+
415+ ### Current Test Status
416+
417+ - ** Total Tests** : 293
418+ - ** Passing** : 291 (99.3%)
419+ - ** Skipped** : 2 (hardware-dependent tests)
420+ - ** Test Framework** : pytest 7.4.4 with asyncio, mock, and coverage support
421+
422+ See [ Testing Guide] ( docs/testing-guide.md ) for detailed testing documentation and [ tests/README.md] ( tests/README.md ) for test-specific information.
423+
424+ ### Code Quality
425+
426+ ``` bash
427+ # Format code
428+ black linux_voice_assistant/ tests/
429+
430+ # Lint code
431+ flake8 linux_voice_assistant/ tests/
432+
433+ # Type checking
434+ mypy linux_voice_assistant/
435+
436+ # Run diagnostics
437+ python tests/diagnose_imports.py
438+ ```
439+
440+ ---
441+
362442## License
363443
364444Licensed under the [ Apache License 2.0] ( LICENSE.md ) .
0 commit comments