Integration Tests (tests/)
Headless C++ testing framework for the Songbird DAW’s core engine, audio processing, and internal plugins.
Architecture
The testing framework revolves around theSongbirdAppCore static library. The monolith application backend has been decoupled from the SongbirdPlayer GUI wrapper, allowing us to link all core capabilities natively into the SongbirdIntegrationTests command-line binary.
Our test components run without initializing a JUCE MessageManager GUI window context, enabling fast and robust CI compatibility.
Key Components
IntegrationTestUtils.h: Utilities to cleanly spool up a TracktionEngineand dummyEdit. ProvidesHeadlessEngineBehaviourwhich taps into the Tracktion plugin builder API to properly hydrate Songbird’s custom plugins (e.g.,SongbirdChannelStrip) by recognizing their stringTypeidentifiers.test_main.cpp: Main test runner — comprehensive integration tests covering bird file parsing, state management, and engine operations.test_plugins.cpp: Activejuce::UnitTestdefinitions that push plugins into the dummy engine, alter parameters, and validate output assertions.
Running the Tests
To compile and execute the tests:Writing Tests
- Add your new test
juce::UnitTeststruct insidetest_plugins.cppor add a newtest_*.cppfile. - If adding a new
.cppfile, ensure to append it to theSongbirdIntegrationTeststarget in the project root’sCMakeLists.txt. - Leverage
songbird_testing::IntegrationTestSetupto get an instant sandbox Tracktion engine without UI bindings.
React UI Tests (Vitest)
The React frontend uses Vitest for unit testing. Tests live alongside the code they test.AI Copilot Tests (src/lib/ai/)
| Suite | Tests | What it covers |
|---|---|---|
bird/__tests__/parser.test.ts | 34 | Tokenizer (10), parser (5), validator (8), edge cases (11) |
core/__tests__/compactor.test.ts | 7 | Threshold behavior, LLM summarization, fallback, caching |
cache/__tests__/context-cache.test.ts | 10 | Cache creation/reuse, invalidation, API failure, payload |
Store Tests (src/data/)
| Suite | What it covers |
|---|---|
slices/chat.test.ts | Chat message and thread management |
slices/generate.test.ts | AI generation job lifecycle |
slices/mixer.test.ts | Track, section, and plugin state |
slices/transport.test.ts | Transport playback and position |
store.test.ts | Store integration and persistence |
sliderDrag.test.ts | Slider drag tracking utility |