Flutter Test Runner by calcitem/sanmill
npx skills add https://github.com/calcitem/sanmill --skill 'Flutter Test Runner'此技能帮助运行和管理 Sanmill 的 Flutter 测试套件,确保代码质量和功能正确性。
src/ui/flutter_app/
├── test/ # 单元和部件测试 (Dart VM, 快速)
├── integration_test/ # 集成测试 (真实平台 + AI 引擎)
└── test_driver/ # 测试驱动程序
cd src/ui/flutter_app
# 运行所有测试
flutter test
# 运行特定测试文件
flutter test test/game/position_test.dart
# 运行并生成覆盖率
flutter test --coverage
# 从仓库根目录 - 使用项目脚本 (推荐)
./run-integration-test.sh --full # 完整测试套件
./run-integration-test.sh --single # 单测试用例
./run-integration-test.sh --help # 显示选项
# 手动执行 (从 src/ui/flutter_app)
flutter test integration_test/ -d linux # Linux
flutter test integration_test/ -d macos # macOS
flutter test integration_test/ -d windows # Windows
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 类型 | 环境 | 原生代码 | 速度 | 用途 |
|---|---|---|---|---|
| 单元/部件 | Dart VM | ❌ 否 | ⚡ 快 | 纯 Dart 逻辑,UI 组件 |
| 集成 | 真实平台 | ✅ 是 | 🐌 慢 | AI 行为,平台特性 |
关键区别:集成测试使用真实的 C++ AI 引擎,必须在实际平台上运行,而非 Dart VM。
# 生成覆盖率
flutter test --coverage
# 查看摘要 (需要 lcov)
lcov --summary coverage/lcov.info
# 生成 HTML 报告
genhtml coverage/lcov.info -o coverage/html
# 然后打开 coverage/html/index.html
覆盖率目标:整体 ≥80%,关键逻辑 ≥90%,UI ≥70%
flutter test test/ 运行集成测试flutter test integration_test/ -d <平台>flutter pub get 或 flutter clean && flutter pub getmaxWaitTimeMssrc/ui/flutter_app/integration_test/AUTOMATED_MOVE_TESTS_README.mdsrc/ui/flutter_app/test/ 和 src/ui/flutter_app/integration_test/测试结果应报告:
每周安装数
0
仓库
GitHub 星标数
189
首次出现
1970年1月1日
安全审计
This skill helps run and manage Sanmill's Flutter test suite, ensuring code quality and functional correctness.
src/ui/flutter_app/
├── test/ # Unit and widget tests (Dart VM, fast)
├── integration_test/ # Integration tests (real platform + AI engine)
└── test_driver/ # Test drivers
cd src/ui/flutter_app
# Run all tests
flutter test
# Run specific test file
flutter test test/game/position_test.dart
# Run with coverage
flutter test --coverage
# From repository root - use the project script (recommended)
./run-integration-test.sh --full # Complete test suite
./run-integration-test.sh --single # Single test case
./run-integration-test.sh --help # Show options
# Manual execution (from src/ui/flutter_app)
flutter test integration_test/ -d linux # Linux
flutter test integration_test/ -d macos # macOS
flutter test integration_test/ -d windows # Windows
| Type | Environment | Native Code | Speed | Use For |
|---|---|---|---|---|
| Unit/Widget | Dart VM | ❌ No | ⚡ Fast | Pure Dart logic, UI components |
| Integration | Real platform | ✅ Yes | 🐌 Slower | AI behavior, platform features |
Key difference : Integration tests use the real C++ AI engine and must run on actual platforms, not the Dart VM.
# Generate coverage
flutter test --coverage
# View summary (requires lcov)
lcov --summary coverage/lcov.info
# Generate HTML report
genhtml coverage/lcov.info -o coverage/html
# Then open coverage/html/index.html
Coverage targets : Overall ≥80%, Critical logic ≥90%, UI ≥70%
flutter test test/flutter test integration_test/ -d <platform>flutter pub get or flutter clean && flutter pub getmaxWaitTimeMs for AI testssrc/ui/flutter_app/integration_test/AUTOMATED_MOVE_TESTS_README.mdsrc/ui/flutter_app/test/ and src/ui/flutter_app/integration_test/Test results should report:
Weekly Installs
0
Repository
GitHub Stars
189
First Seen
Jan 1, 1970
Security Audits
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
31,600 周安装