Skip to content
Agent Workspaces
Skill

/test-flutter

Flutter App のテスト実行・静的解析・フォーマット・テスト記述ガイド

From plugin
ccpocket
1.1k18 skills2 agents2 MCP

Claude Code

$ npx -y skills add K9i-0/ccpocket --skill test-flutter --agent claude-code

SKILL.md

test-flutter.SKILL.md
name: test-flutter
description: Flutter App のテスト実行・静的解析・フォーマット・テスト記述ガイド
allowed-tools: Bash(flutter:*), Bash(dart:*), Read, Glob, Grep

Flutter App テスト

実行手順

変更した挙動に対応するテストと静的検証を選ぶ。全体テストは、共通基盤・依存関係への変更や回帰懸念がある場合、または全体検証を依頼された場合に実行する。成功済みの検証を理由なく繰り返さない。以下はコマンドの選択肢。

1. 静的解析

dart analyze apps/mobile

今回の変更で生じた warning 以上は修正する。既存の無関係な問題は報告し、info は必要に応じて対応する。

**MCP代替:** `mcp__dart-mcp__analyze_files` でも実行可能だが、CLI推奨。

2. フォーマット

dart format <変更したDartファイル>

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/...';

テスト構造

void main() {
  group('対象クラスまたは機能', () {
    test('動作の説明', () {
      // ロジックテスト
      expect(actual, expected);
    });

    testWidgets('UI動作の説明', (tester) async {
      // ウィジェットテスト
      await tester.pumpWidget(MaterialApp(home: TargetWidget()));
      expect(find.text('expected'), findsOneWidget);
    });
  });
}
  • `group` で対象機能ごとにグルーピング
  • ロジックテストは `test()`、UI テストは `testWidgets()` を使い分ける
  • `setUp()` でテスト前の共通初期化を行う

テスト対象の方針

  • **ウィジェットテスト**: 画面の表示・インタラクション検証
  • `pumpWidget` でウィジェット構築 → `find` で要素確認 → `tap`/`enterText` で操作
  • **ロジックテスト**: サービス・ハンドラーの振る舞い検証
  • 純粋なDartクラスのメソッド呼び出しと結果確認
  • WebSocket通信やBridge接続のモックが必要なテストは避ける (E2E領域)
Read more
@k9i-0
Ships withccpocket

Your agents. In your pocket. Codex and Claude, with a chat UI made for your phone. Start a task, approve the next step, and review the result. Pick up the same work on your tablet or Mac.

1.1k18 skills2 agents2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of K9i-0/ccpocket on GitHub, a chart by star-history.com

Other skills on ccpocket.

codex-guide

codex-guide

Codex の使い方、CLI/app/IDE、rules・hooks・AGENTS.md・skills・subagents・config などを案内する。Codex や OpenAI…

@k9i-0@k9i-0Install Skill
flutter-ui-design

flutter-ui-design

Flutter UI実装のアーキテクチャ規約・コンポーネント分割・状態管理ガイド(Bloc/Cubit版)

@k9i-0@k9i-0Install Skill
flutter-upgrade

flutter-upgrade

Flutter SDKのアップグレード、または指定バージョンへの移行影響を調査するときに使う。

@k9i-0@k9i-0Install Skill
merge

merge

作業ブランチを main にマージして push し、ブランチと worktree を片付ける

@k9i-0@k9i-0Install Skill
mobile-automation

mobile-automation

FlutterアプリのUI動作をシミュレーター・エミュレーター・実機で検証する、BridgeとのE2Eを確認する、または権限ダイアログ等のネイティブUIを操作するときに使う。

@k9i-0@k9i-0Install Skill
playwright-cli

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to…

@k9i-0@k9i-0Install Skill

More skills from other plugins.

paseo

paseo

Paseo reference for managing hosts, projects, workspaces, workspace scripts, agents, schedules, and heartbeats.

paseo11d23k
@getpaseo@getpaseoInstall Skill
10x
Auto-invoked

10x

Personalized audit that teaches the advanced Paradev (formerly Superset) features the user isn't using yet (automations, parallel…

paradev2d16k
@superset-sh@superset-shInstall Skill
capabilities

capabilities

Your capability catalog — read this at boot. Lists the temporal date-range skills and the external integrations (reached via the…

@chaitanyagiri@chaitanyagiriInstall Skill

Questions about test-flutter.

Which coding agents can use test-flutter?
test-flutter installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.