Documentation
README
Flutter App テスト
実行手順
以下を順番に実行し、全てパスすることを確認する。
1. 静的解析
dart analyze apps/mobile
warning 以上は修正する。info レベルは必要に応じて対応。
MCP代替: mcp__dart-mcp__analyze_files でも実行可能だが、CLI推奨。
2. フォーマット
dart format apps/mobile
3. ユニットテスト
cd apps/mobile && flutter test
特定ファイルのみ:
cd apps/mobile && flutter test test/<filename>_test.dart
MCP代替: mcp__dart-mcp__run_tests でも実行可能だが、CLI推奨。
MCP版はDTD接続不要な操作のため、CLIの方が効率的。
テスト記述規約
ファイル配置・命名
- テストファイルは
apps/mobile/test/に配置 - 命名:
<対象の概念>_test.dart- ウィジェットテスト例:
approval_bar_test.dart,chat_input_bar_test.dart - ロジックテスト例:
chat_message_handler_test.dart
- ウィジェットテスト例:
import
import 'package:flutter_test/flutter_test.dart';
import 'package:ccpocket/...';
テスト構造
This is the opening of the README. Read the full README on GitHub.