regression-test

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Regression Test

回归测试

Comprehensive testing checklist for voxtype releases.
Note: For detailed manual smoke tests (recording cycles, GPU isolation, output drivers, etc.), see docs/SMOKE_TESTS.md. Run those tests for thorough pre-release validation.
voxtype版本发布的综合测试清单。
注意: 如需详细的手动冒烟测试(录制周期、GPU隔离、输出驱动等),请查看docs/SMOKE_TESTS.md。运行这些测试以完成发布前的全面验证。

Quick Smoke Test

快速冒烟测试

bash
undefined
bash
undefined

Build and basic checks

Build and basic checks

cargo build --release ./target/release/voxtype --version ./target/release/voxtype --help ./target/release/voxtype setup --help
undefined
cargo build --release ./target/release/voxtype --version ./target/release/voxtype --help ./target/release/voxtype setup --help
undefined

Unit Tests

单元测试

bash
cargo test
Key test modules:
  • text::
    - Spoken punctuation and replacements
  • cli::
    - Command-line argument parsing
  • state::
    - State machine transitions
bash
cargo test
核心测试模块:
  • text::
    - 口语标点与替换处理
  • cli::
    - 命令行参数解析
  • state::
    - 状态机转换

CLI Command Tests

CLI命令测试

Setup Commands

设置命令

bash
undefined
bash
undefined

List available models

List available models

./target/release/voxtype setup --list-models
./target/release/voxtype setup --list-models

Show current configuration

Show current configuration

./target/release/voxtype setup --show-config
./target/release/voxtype setup --show-config

Check GPU detection (if available)

Check GPU detection (if available)

./target/release/voxtype setup gpu --status
undefined
./target/release/voxtype setup gpu --status
undefined

Status Commands

状态命令

bash
undefined
bash
undefined

Check daemon status (will fail if not running, that's ok)

Check daemon status (will fail if not running, that's ok)

timeout 2 ./target/release/voxtype status || echo "Daemon not running (expected)"
timeout 2 ./target/release/voxtype status || echo "Daemon not running (expected)"

JSON output format

JSON output format

timeout 2 ./target/release/voxtype status --format json || echo "Daemon not running (expected)"
undefined
timeout 2 ./target/release/voxtype status --format json || echo "Daemon not running (expected)"
undefined

Transcription Test

转录测试

bash
undefined
bash
undefined

Test with a sample audio file (if available)

Test with a sample audio file (if available)

./target/release/voxtype transcribe test.wav
undefined
./target/release/voxtype transcribe test.wav
undefined

Configuration Tests

配置测试

Default Config Loading

默认配置加载

bash
undefined
bash
undefined

Should not error with missing config

Should not error with missing config

rm -f ~/.config/voxtype/config.toml ./target/release/voxtype --help
rm -f ~/.config/voxtype/config.toml ./target/release/voxtype --help

Should load config without errors

Should load config without errors

mkdir -p ~/.config/voxtype cp config/default.toml ~/.config/voxtype/config.toml ./target/release/voxtype setup --show-config
undefined
mkdir -p ~/.config/voxtype cp config/default.toml ~/.config/voxtype/config.toml ./target/release/voxtype setup --show-config
undefined

Config Backwards Compatibility

配置向后兼容性

Test that old config files still work:
bash
undefined
测试旧配置文件是否仍能正常工作:
bash
undefined

Create minimal old-style config

Create minimal old-style config

cat > /tmp/test-config.toml << 'EOF' [hotkey] key = "SCROLLLOCK"
[whisper] model = "base.en" EOF
cat > /tmp/test-config.toml << 'EOF' [hotkey] key = "SCROLLLOCK"
[whisper] model = "base.en" EOF

Should not error

Should not error

./target/release/voxtype --config /tmp/test-config.toml --help
undefined
./target/release/voxtype --config /tmp/test-config.toml --help
undefined

Binary Variant Tests

二进制变体测试

For each binary variant, verify:
bash
VERSION=0.4.14
针对每个二进制变体,验证以下内容:
bash
VERSION=0.4.14

AVX2

AVX2

releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx2 --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx2 --help
releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx2 --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx2 --help

AVX-512

AVX-512

releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx512 --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx512 --help
releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx512 --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-avx512 --help

Vulkan

Vulkan

releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --help
undefined
releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --version releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --help
undefined

Integration Tests

集成测试

Daemon Lifecycle

守护进程生命周期

bash
undefined
bash
undefined

Start daemon

Start daemon

./target/release/voxtype & DAEMON_PID=$! sleep 2
./target/release/voxtype & DAEMON_PID=$! sleep 2

Check it's running

Check it's running

./target/release/voxtype status
./target/release/voxtype status

Stop daemon

Stop daemon

kill $DAEMON_PID
undefined
kill $DAEMON_PID
undefined

Signal Handling

信号处理

bash
./target/release/voxtype &
DAEMON_PID=$!
sleep 1
bash
./target/release/voxtype &
DAEMON_PID=$!
sleep 1

SIGUSR1 should start recording (will fail without audio, ok)

SIGUSR1 should start recording (will fail without audio, ok)

kill -USR1 $DAEMON_PID
kill -USR1 $DAEMON_PID

SIGTERM should graceful shutdown

SIGTERM should graceful shutdown

kill -TERM $DAEMON_PID
undefined
kill -TERM $DAEMON_PID
undefined

Package Tests

包测试

Debian Package

Debian包

bash
undefined
bash
undefined

Validate structure

Validate structure

dpkg-deb --info releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb
dpkg-deb --info releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb

List contents

List contents

dpkg-deb --contents releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb
dpkg-deb --contents releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb

Check for required files

Check for required files

dpkg-deb --contents releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb | grep -E 'voxtype-avx2|voxtype-avx512|config.toml|voxtype.service'
undefined
dpkg-deb --contents releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb | grep -E 'voxtype-avx2|voxtype-avx512|config.toml|voxtype.service'
undefined

RPM Package

RPM包

bash
rpm -qp --info releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm
rpm -qp --list releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm
bash
rpm -qp --info releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm
rpm -qp --list releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm

Checklist for Major Releases

重大版本发布检查清单

  • cargo test
    passes
  • cargo clippy
    has no warnings
  • All binary variants build successfully
  • Binary instruction validation passes (no AVX-512 in AVX2/Vulkan)
  • Version numbers match across all binaries
  • CLI --help output is correct
  • Default config loads without errors
  • Old configs still work (backwards compatibility)
  • Packages install correctly on target distros
  • Daemon starts and stops cleanly
  • Recording/transcription works end-to-end (manual test)
  • cargo test
    执行通过
  • cargo clippy
    无警告
  • 所有二进制变体构建成功
  • 二进制指令验证通过(AVX2/Vulkan变体中不包含AVX-512指令)
  • 所有二进制文件的版本号一致
  • CLI --help输出内容正确
  • 默认配置加载无错误
  • 旧配置文件仍可正常使用(向后兼容性)
  • 包在目标发行版上安装正常
  • 守护进程可正常启动与停止
  • 录制/转录端到端功能正常(手动测试)

Known Test Limitations

已知测试限制

  • Audio capture requires real audio hardware (can't fully test in CI)
  • evdev hotkey detection requires
    /dev/input
    access
  • Transcription requires downloaded Whisper model
  • GPU acceleration requires Vulkan-capable hardware
  • 音频捕获需要真实的音频硬件(无法在CI中完成全面测试)
  • evdev热键检测需要访问
    /dev/input
  • 转录需要已下载的Whisper模型
  • GPU加速需要支持Vulkan的硬件