regression-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRegression 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
undefinedbash
undefinedBuild and basic checks
Build and basic checks
cargo build --release
./target/release/voxtype --version
./target/release/voxtype --help
./target/release/voxtype setup --help
undefinedcargo build --release
./target/release/voxtype --version
./target/release/voxtype --help
./target/release/voxtype setup --help
undefinedUnit Tests
单元测试
bash
cargo testKey test modules:
- - Spoken punctuation and replacements
text:: - - Command-line argument parsing
cli:: - - State machine transitions
state::
bash
cargo test核心测试模块:
- - 口语标点与替换处理
text:: - - 命令行参数解析
cli:: - - 状态机转换
state::
CLI Command Tests
CLI命令测试
Setup Commands
设置命令
bash
undefinedbash
undefinedList 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
undefinedStatus Commands
状态命令
bash
undefinedbash
undefinedCheck 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)"
undefinedtimeout 2 ./target/release/voxtype status --format json || echo "Daemon not running (expected)"
undefinedTranscription Test
转录测试
bash
undefinedbash
undefinedTest 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
undefinedConfiguration Tests
配置测试
Default Config Loading
默认配置加载
bash
undefinedbash
undefinedShould 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
undefinedmkdir -p ~/.config/voxtype
cp config/default.toml ~/.config/voxtype/config.toml
./target/release/voxtype setup --show-config
undefinedConfig Backwards Compatibility
配置向后兼容性
Test that old config files still work:
bash
undefined测试旧配置文件是否仍能正常工作:
bash
undefinedCreate 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
undefinedBinary Variant Tests
二进制变体测试
For each binary variant, verify:
bash
VERSION=0.4.14针对每个二进制变体,验证以下内容:
bash
VERSION=0.4.14AVX2
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
undefinedreleases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --version
releases/${VERSION}/voxtype-${VERSION}-linux-x86_64-vulkan --help
undefinedIntegration Tests
集成测试
Daemon Lifecycle
守护进程生命周期
bash
undefinedbash
undefinedStart 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
undefinedkill $DAEMON_PID
undefinedSignal Handling
信号处理
bash
./target/release/voxtype &
DAEMON_PID=$!
sleep 1bash
./target/release/voxtype &
DAEMON_PID=$!
sleep 1SIGUSR1 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
undefinedkill -TERM $DAEMON_PID
undefinedPackage Tests
包测试
Debian Package
Debian包
bash
undefinedbash
undefinedValidate 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'
undefineddpkg-deb --contents releases/${VERSION}/voxtype_${VERSION}-1_amd64.deb | grep -E 'voxtype-avx2|voxtype-avx512|config.toml|voxtype.service'
undefinedRPM Package
RPM包
bash
rpm -qp --info releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm
rpm -qp --list releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpmbash
rpm -qp --info releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpm
rpm -qp --list releases/${VERSION}/voxtype-${VERSION}-1.x86_64.rpmChecklist for Major Releases
重大版本发布检查清单
- passes
cargo test - has no warnings
cargo clippy - 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 access
/dev/input - Transcription requires downloaded Whisper model
- GPU acceleration requires Vulkan-capable hardware
- 音频捕获需要真实的音频硬件(无法在CI中完成全面测试)
- evdev热键检测需要访问
/dev/input - 转录需要已下载的Whisper模型
- GPU加速需要支持Vulkan的硬件