fprime-component-integration-test
できること
地上システムを通じてコマンドを送り、イベントとテレメトリを確認するインテグレーションテストを書く手順を、AIに案内します。F Primeのコンポーネントをテストするエンジニア向けです。
使う場面
- ✓単体テストが通り、F Primeのコンポーネントのインテグレーションテストが必要なとき。
- ✓実行中のF Primeのデプロイにコマンドを送るテストがほしいとき。
- ✓稼働中のシステムでコンポーネントのイベントとテレメトリを確認したいとき。
スキルのリンク
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-integration-test/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このF Primeのコンポーネントにコマンドを送り、イベントを確認するpytestのインテグレーションテストを書いてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIはコンポーネントのフォルダーにテストファイルを作り、地上データシステムのテストAPIを使ってコマンドを送り、イベントとテレメトリを読み、テストを実行します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Skill: F Prime Reusable Component Integration Testing
Reusable integration tests live in the component's own
test/int/ folder and verify that the component works correctly
in a running deployment. They exercise the component through the
Ground Data System (GDS) — sending commands, checking events, and
reading telemetry over the actual communication stack.
For the full implementation guide, see Reusable Integration Tests. For the complete API reference (send commands, assert events/telemetry, predicates, histories), see the GDS Integration Test API Guide.
Note: This skill covers component-level reusable integration tests. System-wide integration tests (testing cross-component workflows across an entire deployment) are a separate concern.
Prerequisites
The component must be added to a topology before integration tests
can run. If it has not been integrated yet, see
docs/user-manual/overview/development-practice.md § "Assemble
Topology".
The deployment must be running (via fprime-gds) for integration
tests to execute.
Process
Step 1 — Set Up Test Directory
Create test/int/test_<ComponentName>.py in the component folder.
See
Reusable Integration Tests
for the expected file layout and int_config.json configuration.
Step 2 — Write Reusable Tests
Tests use pytest with the fprime_test_api fixture. Use
fprime_test_api.get_mnemonic() to resolve instance names from a
configuration file, making tests portable across deployments. See the
GDS Test API Guide
for the full API (sending commands, asserting events/telemetry,
predicates, sequences).
Key patterns:
send_and_assert_command()— send + verify command success eventsassert_event()/assert_telemetry()— verify component outputget_mnemonic()— resolve qualified names for portability- Map each test to a requirement in the docstring (
Covers: REQ-*)
Step 3 — Draft Requirements Coverage
Draft which requirements should be covered by integration tests. Aim for reasonable coverage of the component's requirements, especially those that exercise inter-component behavior.
Step 4 — Run Integration Tests
# Start the deployment + GDS (in separate terminal)
fprime-gds --dictionary <path-to-dictionary>
# Run the component's reusable tests against a deployment
pytest <Component>/test/int/ \
--dictionary <path-to-dictionary> \
--deployment-config <path>/int_config.json
See Reusable Integration Tests § Running the tests
for CI integration using fprime-actions/run-integration-tests.
Anti-Patterns
- Hardcoding instance mnemonics — use
get_mnemonic()for portability - Writing tests that depend on test execution order
- Ignoring
max_delay/timeout(tests will hang or be flaky) - Not mapping tests to requirements
- Testing unit-level behavior in integration tests (use unit tests for that)
よくある質問
テストには稼働中のシステムが必要ですか?
はい。テストを実行する前に、地上データシステムを通じてデプロイが稼働している必要があります。
システム全体の流れもテストできますか?
いいえ。このテストは1つのコンポーネントを対象とします。システム全体のテストは別の話題です。
テストはどこに置きますか?
コンポーネント自身のtest/intフォルダーに置くため、そのコンポーネントを含むどのデプロイでも実行できます。
詳細
作者による元の説明
Integration testing phase of F Prime component development. Guides the agent through writing reusable pytest-based integration tests in the component's test/int/ folder using the GDS Integration Test API. These tests ship with the component and can be run against any deployment that includes it. Trigger when unit tests pass and the component is ready for integration testing. Keywords: F Prime, integration test, pytest, GDS, fprime_test_api, reusable test, component test.
repo: nasa/fprime
人気
- GitHubのスター
- 12k
- ランキング
- #11497
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
fprime-cmake-build-system
12kエージェントが、CMakeの層を通じて、F Primeの飛行ソフトウェアのプロジェクトにモジュール、ビルドのターゲット、プラットフォームの設定を追加できるよう支援します。
fprime-component-design-fpp
12kエージェントが、承認されたF Primeのコンポーネント要件を、ポート、コマンド、イベント、テレメトリのFPPモデルに変換できるよう支援します。
fprime-component-development
12kエージェントが、要件からインテグレーションテストまで、F Primeのコンポーネントを各開発フェーズで進められるよう支援します。
fprime-component-implementation
12kエージェントが、プロジェクトのルールに従って、F Primeのコンポーネントの自動生成されたハンドラー関数の裏にあるC++のコードを書けるよう支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。