Test Plan

Introduction

This test plan covers MVP requirements (36 functional requirements, 25 non-functional requirements).

Test Strategy

Test Levels

Level

Scope

Tools

Unit

Individual functions

Rust #[test]

Integration

Component interactions

Rust integration tests

System

End-to-end workflows

Manual testing

Features Not Tested

Feature

Reason

whisper.cpp internals

Third-party software

OS audio APIs

Platform dependency

SQLite engine

Third-party software

Test Automation Approach

MVP: Manual testing only. Automation deferred until post-MVP stabilization.

Unit tests (automatable):

Component

What to Test

Mock Strategy

db.rs

CRUD operations

In-memory SQLite (:memory:)

whisper.rs

Command building, output parsing

Mock Command output

audio.rs

WAV file format validation

Pre-recorded test files

Integration tests (partially automatable):

Test

Automation Notes

Database + file storage

Use temp directories

Settings persistence

In-memory database

Path validation

Unit testable

System tests (manual only):

Test

Why Manual

Tray icon states

Requires visual verification

Global hotkeys

Requires OS-level interaction

Audio recording

Requires microphone hardware

Notifications

Platform-specific behavior

Mock whisper.cpp: For CI, create a simple binary that echoes test input:

#!/bin/bash
# mock-whisper.sh - Returns predictable output for testing
echo "This is a test transcription."

Test Cases by Category

Recording Tests

ID

Title

Tests

Priority

TC-REC-001

Hotkey Starts Recording

FR-WHISPER-001

high

TC-REC-002

Hotkey Stops Recording

FR-WHISPER-001

high

TC-REC-003

Tray Icon Recording State

FR-WHISPER-002

high

TC-REC-004

Default Microphone Capture

FR-WHISPER-003

high

TC-REC-005

WAV File Format Validation

FR-WHISPER-004

high

TC-REC-006

Tray Menu Shows Recording Duration

FR-WHISPER-005

medium

TC-REC-007

Recording Duration Limit

FR-WHISPER-006

medium

TC-REC-008

Custom Audio Device

FR-WHISPER-007

medium

Traceable Test Cases (sphinx-needs directives):

Test Case: Hotkey Starts Recording TC-REC-001
status: approved
tags: whisper, recording, hotkey
priority: high
release: v1.0

Steps:

  1. Configure global hotkey in settings

  2. Press configured hotkey

  3. Verify recording starts

Expected: Tray icon shows recording state, audio buffer initializes

Test Case: Hotkey Stops Recording TC-REC-002
status: approved
tags: whisper, recording, hotkey
priority: high
release: v1.0

Steps:

  1. Start recording via hotkey

  2. Press hotkey again

  3. Verify recording stops

Expected: WAV file saved, transcription begins

Test Case: Tray Icon Recording State TC-REC-003
status: approved
tags: whisper, recording, ui
priority: high
release: v1.0

Steps:

  1. Start recording

  2. Observe tray icon

Expected: Icon changes color/appearance to indicate recording state

Test Case: Default Microphone Capture TC-REC-004
status: approved
tags: whisper, recording, audio
priority: high
release: v1.0

Steps:

  1. Start recording with default settings

  2. Speak into system default microphone

  3. Stop recording

Expected: Audio captured from correct device

Test Case: WAV File Format Validation TC-REC-005
status: approved
tags: whisper, recording, audio
priority: high
release: v1.0

Steps:

  1. Complete a recording

  2. Inspect generated WAV file

Expected: 16kHz mono WAV format

Transcription Tests

ID

Title

Tests

Priority

TC-NFR-007

Transcription Performance

NFR-WHISPER-007

medium

TC-NFR-024

Large Transcription Handling

NFR-WHISPER-024

medium

TC-TRS-001

Whisper.cpp Invocation

FR-WHISPER-008

high

TC-TRS-002

Transcription Text Extraction

FR-WHISPER-009

high

TC-TRS-003

Transcription Notification

FR-WHISPER-010

high

TC-TRS-004

Transcription Progress Icon

FR-WHISPER-011

medium

TC-TRS-005

Transcription Error Notification

FR-WHISPER-012

high

Test Case: Whisper.cpp Invocation TC-TRS-001
status: approved
tags: whisper, transcription
priority: high
release: v1.0

Steps:

  1. Stop recording

  2. Monitor system processes

Expected: whisper.cpp binary executed with correct model path

Test Case: Transcription Text Extraction TC-TRS-002
status: approved
tags: whisper, transcription
priority: high
release: v1.0

Steps:

  1. Complete transcription

  2. Check stored text

Expected: Text correctly parsed from whisper.cpp stdout

Test Case: Transcription Notification TC-TRS-003
status: approved
tags: whisper, transcription, ui
priority: high
release: v1.0

Steps:

  1. Complete transcription

  2. Observe system notification

Expected: Notification shows preview of transcribed text

Test Case: Transcription Progress Icon TC-TRS-004
status: approved
tags: whisper, transcription, ui
priority: medium
release: v1.0

Steps:

  1. Stop recording (transcription starts)

  2. Observe tray icon

Expected: Icon indicates transcription in progress

Test Case: Transcription Error Notification TC-TRS-005
status: approved
tags: whisper, transcription, error
priority: high
release: v1.0

Steps:

  1. Simulate whisper.cpp failure (invalid model path)

  2. Attempt transcription

Expected: Error notification displayed with helpful message

Test Case: Tray Menu Shows Recording Duration TC-REC-006
status: approved
tags: whisper, recording, ui
priority: medium
release: v1.0

Verify tray menu displays recording duration while active

Test Case: Recording Duration Limit TC-REC-007
status: approved
tags: whisper, recording
priority: medium
release: v1.0

Verify recording stops at configured duration limit

Test Case: Custom Audio Device TC-REC-008
status: approved
tags: whisper, recording, audio
priority: medium
release: v1.0

Verify custom audio input device selection works correctly

History Tests

ID

Title

Tests

Priority

TC-HIS-001

Transcription Saved to Database

FR-WHISPER-013

high

TC-HIS-002

Tray Menu Shows Recent Items

FR-WHISPER-014

high

TC-HIS-003

Menu Items Show Timestamp and Preview

FR-WHISPER-015

medium

TC-HIS-004

Click Menu Item Copies to Clipboard

FR-WHISPER-016

high

TC-HIS-005

View History Dialog

FR-WHISPER-017

medium

TC-HIS-006

Delete Transcription

FR-WHISPER-018

medium

Test Case: Transcription Saved to Database TC-HIS-001
status: approved
tags: whisper, history, database
priority: high
release: v1.0

Verify all transcriptions are saved to SQLite database

Test Case: Tray Menu Shows Recent Items TC-HIS-002
status: approved
tags: whisper, history, ui
priority: high
release: v1.0

Verify tray menu displays recent transcriptions (newest first)

Test Case: Menu Items Show Timestamp and Preview TC-HIS-003
status: approved
tags: whisper, history, ui
priority: medium
release: v1.0

Verify menu items display timestamp and text preview

Test Case: Click Menu Item Copies to Clipboard TC-HIS-004
status: approved
tags: whisper, history, clipboard
priority: high
release: v1.0

Verify clicking menu item copies full transcription to clipboard

Test Case: View History Dialog TC-HIS-005
status: approved
tags: whisper, history, ui
priority: medium
release: v1.0

Verify “View History” opens native dialog with full list

Test Case: Delete Transcription TC-HIS-006
status: approved
tags: whisper, history
priority: medium
release: v1.0

Verify transcription can be deleted from history dialog

Output Tests

ID

Title

Tests

Priority

TC-OUT-001

Hotkey Copies Last Transcription

FR-WHISPER-019

high

TC-OUT-002

Export to Text File

FR-WHISPER-020

medium

Test Case: Hotkey Copies Last Transcription TC-OUT-001
status: approved
tags: whisper, output, hotkey, clipboard
priority: high
release: v1.0

Verify global hotkey copies most recent transcription to clipboard

Test Case: Export to Text File TC-OUT-002
status: approved
tags: whisper, output, file
priority: medium
release: v1.0

Verify transcription can be exported as .txt file from history dialog

Settings Tests

ID

Title

Tests

Priority

TC-NFR-014

Settings Dialog Usability

NFR-WHISPER-014

medium

TC-SET-001

Settings Dialog Opens

FR-WHISPER-021

high

TC-SET-002

Configure Whisper Path

FR-WHISPER-022

high

TC-SET-003

Configure Model Path

FR-WHISPER-023

high

TC-SET-004

Path Validation

FR-WHISPER-024

high

TC-SET-005

Configure Hotkeys

FR-WHISPER-025

high

TC-SET-006

First-Run Prompt

FR-WHISPER-026

medium

Test Case: Settings Dialog Opens TC-SET-001
status: approved
tags: whisper, settings, ui
priority: high
release: v1.0

Verify “Settings” menu item opens native settings dialog

Test Case: Configure Whisper Path TC-SET-002
status: approved
tags: whisper, settings, configuration
priority: high
release: v1.0

Verify whisper.cpp binary path can be configured with file picker

Test Case: Configure Model Path TC-SET-003
status: approved
tags: whisper, settings, configuration
priority: high
release: v1.0

Verify model file path can be configured with file picker

Test Case: Path Validation TC-SET-004
status: approved
tags: whisper, settings, validation
priority: high
release: v1.0

Verify paths are validated to exist before save

Test Case: Configure Hotkeys TC-SET-005
status: approved
tags: whisper, settings, hotkey
priority: high
release: v1.0

Verify global hotkeys can be configured with conflict detection

Test Case: First-Run Prompt TC-SET-006
status: approved
tags: whisper, settings, ux
priority: medium
release: v1.0

Verify first-run prompt appears when paths not configured

System Tray Tests

ID

Title

Tests

Priority

TC-NFR-013

Tray Icon State Indication

NFR-WHISPER-013

high

TC-NFR-020

Platform-Specific Tray Support

NFR-WHISPER-020

high

TC-TRAY-001

Tray Icon Shows Status

FR-WHISPER-027

high

TC-TRAY-002

Left-Click Toggles Recording

FR-WHISPER-028

high

TC-TRAY-003

Right-Click Shows Menu

FR-WHISPER-029

high

TC-TRAY-004

App Starts Minimized to Tray

FR-WHISPER-030

high

Test Case: Tray Icon Shows Status TC-TRAY-001
status: approved
tags: whisper, tray, ui
priority: high
release: v1.0

Verify tray icon shows app status (idle/recording/transcribing)

Test Case: Left-Click Toggles Recording TC-TRAY-002
status: approved
tags: whisper, tray, ui
priority: high
release: v1.0

Verify left-click on tray icon toggles recording

Test Case: Right-Click Shows Menu TC-TRAY-003
status: approved
tags: whisper, tray, ui
priority: high
release: v1.0

Verify right-click shows menu with Recent items, Settings, Quit

Test Case: App Starts Minimized to Tray TC-TRAY-004
status: approved
tags: whisper, tray, ui
priority: high
release: v1.0

Verify app starts minimized to tray (no main window)

Security Tests

ID

Title

Tests

Priority

TC-NFR-005

Privacy Guarantee Verification

NFR-WHISPER-003

critical

TC-NFR-025

Optional Database Encryption

NFR-WHISPER-025

low

TC-SEC-001

Path Traversal Rejected

FR-WHISPER-031

critical

TC-SEC-002

SQL Injection Prevention

FR-WHISPER-032

critical

TC-SEC-003

No Network Calls (Firewall Test)

FR-WHISPER-033

critical

TC-SEC-004

No Network Calls (Packet Capture)

FR-WHISPER-033

critical

TC-SEC-005

App Works Offline

FR-WHISPER-033; NFR-WHISPER-004

critical

Test Case: Path Traversal Rejected TC-SEC-001
status: approved
tags: whisper, security
priority: critical
release: v1.0

Verify file paths with .. are rejected

Test Case: SQL Injection Prevention TC-SEC-002
status: approved
tags: whisper, security, database
priority: critical
release: v1.0

Verify parameterized queries prevent SQL injection

Test Case: No Network Calls (Firewall Test) TC-SEC-003
status: approved
tags: whisper, security, privacy
priority: critical
release: v1.0

Verify no network calls using firewall monitoring

Test Case: No Network Calls (Packet Capture) TC-SEC-004
status: approved
tags: whisper, security, privacy
priority: critical
release: v1.0

Verify no network calls using packet capture analysis

Test Case: App Works Offline TC-SEC-005
status: approved
tags: whisper, security, privacy, offline
priority: critical
release: v1.0

Verify app is 100% functional offline (airplane mode test)

Deployment Tests

ID

Title

Tests

Priority

TC-DEP-001

Cargo Vendor Directory Present

FR-WHISPER-034

high

TC-DEP-002

Build Succeeds Without Internet

FR-WHISPER-035

critical

TC-DEP-003

Single-Directory Deployment

FR-WHISPER-036

medium

TC-NFR-003

Build on Air-Gapped System

NFR-WHISPER-005

high

Test Case: Cargo Vendor Directory Present TC-DEP-001
status: approved
tags: whisper, deployment
priority: high
release: v1.0

Verify cargo vendor directory is present for offline build

Test Case: Build Succeeds Without Internet TC-DEP-002
status: approved
tags: whisper, deployment
priority: critical
release: v1.0

Verify build process works without internet after initial setup

Test Case: Single-Directory Deployment TC-DEP-003
status: approved
tags: whisper, deployment
priority: medium
release: v1.0

Verify single-directory deployment works (app + whisper.cpp + model)

Non-Functional Tests

ID

Title

Tests

Priority

TC-NFR-001

App Launch Time

NFR-WHISPER-001

high

TC-NFR-002

Memory Footprint

NFR-WHISPER-002

high

TC-NFR-003

Build on Air-Gapped System

NFR-WHISPER-005

high

TC-NFR-004

System Theme Support

NFR-WHISPER-006

medium

TC-NFR-005

Privacy Guarantee Verification

NFR-WHISPER-003

critical

TC-NFR-006

Offline Functionality Test

NFR-WHISPER-004

critical

TC-NFR-007

Transcription Performance

NFR-WHISPER-007

medium

TC-NFR-008

Audio File Integrity Check

NFR-WHISPER-008

high

TC-NFR-009

Database Transaction Safety

NFR-WHISPER-009

high

TC-NFR-010

Whisper.cpp Crash Handling

NFR-WHISPER-010

high

TC-NFR-011

Hotkey Registration Recovery

NFR-WHISPER-011

medium

TC-NFR-012

Notification Clarity

NFR-WHISPER-012

high

TC-NFR-013

Tray Icon State Indication

NFR-WHISPER-013

high

TC-NFR-014

Settings Dialog Usability

NFR-WHISPER-014

medium

TC-NFR-015

First-Time Setup Experience

NFR-WHISPER-015

medium

TC-NFR-016

Test Coverage Verification

NFR-WHISPER-016

high

TC-NFR-017

API Documentation Completeness

NFR-WHISPER-017

high

TC-NFR-018

Clippy Compliance Check

NFR-WHISPER-018

high

TC-NFR-019

Code Formatting Check

NFR-WHISPER-019

high

TC-NFR-020

Platform-Specific Tray Support

NFR-WHISPER-020

high

TC-NFR-021

Audio Device Compatibility

NFR-WHISPER-021

high

TC-NFR-022

Database Growth Performance

NFR-WHISPER-022

medium

TC-NFR-023

Long Audio Recording Support

NFR-WHISPER-023

medium

TC-NFR-024

Large Transcription Handling

NFR-WHISPER-024

medium

TC-NFR-025

Optional Database Encryption

NFR-WHISPER-025

low

Test Case: App Launch Time TC-NFR-001
status: approved
tags: whisper, performance
priority: high
release: v1.0

Verify app launches in < 2 seconds

Test Case: Memory Footprint TC-NFR-002
status: approved
tags: whisper, performance
priority: high
release: v1.0

Verify memory usage < 100 MB (excluding whisper.cpp)

Test Case: Build on Air-Gapped System TC-NFR-003
status: approved
tags: whisper, deployment, offline
priority: high
release: v1.0

Verify build succeeds on air-gapped system with no internet

Test Case: System Theme Support TC-NFR-004
status: approved
tags: whisper, ui, accessibility
priority: medium
release: v1.0

Verify app follows system theme (dark/light)

Test Case: Privacy Guarantee Verification TC-NFR-005
status: approved
tags: whisper, privacy, security
priority: critical
release: v1.0

Verify no network calls under any circumstance (monitor with network sniffer).

Note

Overlaps with TC-SEC-003 (firewall test) and TC-SEC-004 (packet capture). Consider consolidating into a single network isolation test suite.

Test Case: Offline Functionality Test TC-NFR-006
status: approved
tags: whisper, offline
priority: critical
release: v1.0

Verify 100% functionality with network disconnected.

Note

Overlaps with TC-SEC-005 (airplane mode test). Consider consolidating into a single offline verification procedure.

Test Case: Transcription Performance TC-NFR-007
status: approved
tags: whisper, performance, transcription
priority: medium
release: v1.0

Verify transcription completes within 2x recording duration

Test Case: Audio File Integrity Check TC-NFR-008
status: approved
tags: whisper, reliability, audio
priority: high
release: v1.0

Verify WAV file integrity verified before transcription

Test Case: Database Transaction Safety TC-NFR-009
status: approved
tags: whisper, reliability, database
priority: high
release: v1.0

Verify database operations use transactions preventing data loss

Test Case: Whisper.cpp Crash Handling TC-NFR-010
status: approved
tags: whisper, reliability, error-handling
priority: high
release: v1.0

Verify whisper.cpp crashes handled gracefully without audio loss

Test Case: Hotkey Registration Recovery TC-NFR-011
status: approved
tags: whisper, reliability, hotkeys
priority: medium
release: v1.0

Verify detection and recovery from hotkey registration failures

Test Case: Notification Clarity TC-NFR-012
status: approved
tags: whisper, usability, notifications
priority: high
release: v1.0

Verify notifications include clear status and transcription preview

Test Case: Tray Icon State Indication TC-NFR-013
status: approved
tags: whisper, usability, tray
priority: high
release: v1.0

Verify tray icon clearly indicates state (idle/recording/transcribing)

Test Case: Settings Dialog Usability TC-NFR-014
status: approved
tags: whisper, usability, settings
priority: medium
release: v1.0

Verify settings dialog provides clear labels and validation feedback

Test Case: First-Time Setup Experience TC-NFR-015
status: approved
tags: whisper, usability, setup
priority: medium
release: v1.0

Verify first-time users guided to configure whisper.cpp path

Test Case: Test Coverage Verification TC-NFR-016
status: approved
tags: whisper, maintainability, testing
priority: high
release: v1.0

Verify codebase achieves ≥80% test coverage via cargo tarpaulin

Test Case: API Documentation Completeness TC-NFR-017
status: approved
tags: whisper, maintainability, documentation
priority: high
release: v1.0

Verify all public APIs have rustdoc documentation

Test Case: Clippy Compliance Check TC-NFR-018
status: approved
tags: whisper, maintainability, code-quality
priority: high
release: v1.0

Verify cargo clippy passes with zero warnings

Test Case: Code Formatting Check TC-NFR-019
status: approved
tags: whisper, maintainability, code-quality
priority: high
release: v1.0

Verify code formatted with rustfmt (cargo fmt –check)

Test Case: Platform-Specific Tray Support TC-NFR-020
status: approved
tags: whisper, portability, tray
priority: high
release: v1.0

Verify native tray icons on macOS, Windows, Linux with GNOME AppIndicator

Test Case: Audio Device Compatibility TC-NFR-021
status: approved
tags: whisper, portability, audio
priority: high
release: v1.0

Verify compatibility with standard audio input devices across platforms

Test Case: Database Growth Performance TC-NFR-022
status: approved
tags: whisper, scalability, database
priority: medium
release: v1.0

Verify performance with 10,000+ transcriptions without degradation

Test Case: Long Audio Recording Support TC-NFR-023
status: approved
tags: whisper, scalability, audio
priority: medium
release: v1.0

Verify support for audio recordings up to 120 minutes

Test Case: Large Transcription Handling TC-NFR-024
status: approved
tags: whisper, scalability, transcription
priority: medium
release: v1.0

Verify handling of transcriptions with 50,000+ characters

Test Case: Optional Database Encryption TC-NFR-025
status: approved
tags: whisper, security, database
priority: low
release: v1.0

Verify optional SQLite encryption for sensitive transcriptions (if implemented)

Test Procedures

Network Isolation Test (TC-SEC-003)

Preconditions:

  • App installed

  • Firewall configured to block all app connections

Steps:

  1. Enable firewall blocking for app

  2. Launch app

  3. Record audio (30 seconds)

  4. Stop and transcribe

  5. View history

  6. Check firewall logs

Pass Criteria: Zero blocked connection attempts in logs.

Offline Operation Test (TC-SEC-005)

Preconditions:

  • App installed with configured whisper.cpp

  • Network disconnected (airplane mode)

Steps:

  1. Disconnect network

  2. Launch app

  3. Record → transcribe → copy

  4. Verify all features work

Pass Criteria: All operations complete successfully.

Air-Gap Build Test (TC-DEP-002)

Preconditions:

  • Fresh clone of repository with vendored dependencies

  • Network disconnected (airplane mode or air-gapped VM)

Steps:

  1. Clone repository to air-gapped system

  2. Run cargo build --release --offline

  3. Verify binary is produced

Pass Criteria: Build completes successfully with no network access.

Pass/Fail Criteria

  • All Critical tests must pass before release

  • All High priority tests must pass before release

  • Medium priority tests: 90% pass rate acceptable