Skip to content

test(app): add workflow integration tests for pipeline#55

Merged
pasrom merged 8 commits intomainfrom
test/workflow-integration-tests
Mar 21, 2026
Merged

test(app): add workflow integration tests for pipeline#55
pasrom merged 8 commits intomainfrom
test/workflow-integration-tests

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 21, 2026

Summary

  • 12 new workflow integration tests covering the full PipelineQueue pipeline end-to-end with mocks
  • Enhanced MockDiarization (runCount counter, shouldThrow) and MockProtocolGen (shouldThrow + throws)
  • Extracted shared createTestAudioFile(in:) to TestHelpers to eliminate duplication with PipelineQueueTests

Test Scenarios

Test Scenario
testWorkflowSingleSourceNoDiarization Happy path, full state sequence, files saved
testWorkflowWithDiarizationAndNaming Diarization + speaker naming confirmation
testWorkflowDualSource Dual-source, engine called 2×, Remote label
testWorkflowEmptyTranscriptEndsInError Empty transcript → error state
testWorkflowEngineThrowsEndsInError Engine failure → error state
testWorkflowProtocolGenerationFailsEndsInError Protocol gen failure → error state
testWorkflowDiarizationUnavailableSkips Diarization unavailable → skipped
testWorkflowDiarizationNoEmbeddingsFallsBack No embeddings → fallback
testWorkflowSpeakerNamingSkipped User skips naming → completes
testWorkflowSpeakerNamingRerun Rerun with N speakers → diarization 2×
testMultipleJobsProcessedSequentially Two jobs in order
testErrorJobDoesNotBlockNextJob Failed job doesn't block next

Test plan

  • All 737 tests pass (725 existing + 12 new)
  • Lint: 0 serious violations

@github-actions github-actions bot added the chore Maintenance or non-functional changes label Mar 21, 2026
…ests

Replace MockDiarization.runCalled bool with runCount counter to verify
call counts in rerun scenarios. Add shouldThrow to MockProtocolGen to
test protocol generation failure paths. Extract createTestAudioFile to
shared TestHelpers. Fix WatchLoopE2ETests reference.
@pasrom pasrom force-pushed the test/workflow-integration-tests branch from 5af8edf to fec3e7e Compare March 21, 2026 21:14
pasrom added 7 commits March 21, 2026 22:22
…ppy path

WorkflowHarness bundles MockEngine + MockDiarization + MockProtocolGen
with PipelineQueue and a TransitionCollector for state tracking. First
test verifies the full single-source no-diarization pipeline.
Enqueue jobs one-at-a-time to avoid race with triggerProcessing().
Verifies sequential processing and that a failed job does not block
subsequent jobs.
@pasrom pasrom force-pushed the test/workflow-integration-tests branch from fec3e7e to a7b922f Compare March 21, 2026 21:28
@pasrom pasrom merged commit 98b2cbe into main Mar 21, 2026
6 checks passed
@pasrom pasrom deleted the test/workflow-integration-tests branch March 21, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance or non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant