fprime-component-integration-test
Fungsinya
Skill ini memandu AI untuk menulis tes integrasi yang mengirim perintah dan memeriksa event serta telemetri melalui sistem darat. Skill ini untuk insinyur yang menguji komponen F Prime.
Kapan dipakai
- βSaat tes unit lolos dan komponen F Prime perlu diuji integrasinya.
- βSaat Anda ingin tes yang mengirim perintah ke deployment F Prime yang sedang berjalan.
- βSaat Anda perlu memeriksa event dan telemetri komponen dalam sistem yang aktif.
Link skill
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-integration-test/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda menulis tes integrasi pytest yang mengirim perintah dan memeriksa event untuk komponen F Prime ini?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI menyiapkan berkas tes di folder komponen, memakai API tes sistem darat untuk mengirim perintah serta membaca event dan telemetri, lalu menjalankan tesnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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)
Pertanyaan umum
Apakah tes memerlukan sistem yang sedang berjalan?
Ya. Deployment harus berjalan melalui ground data system sebelum tes dijalankan.
Apakah tes ini mencakup alur kerja seluruh sistem?
Tidak. Tes ini mencakup satu komponen, dan tes untuk seluruh sistem adalah topik terpisah.
Di mana tesnya disimpan?
Tes disimpan di folder test/int milik komponen, sehingga deployment mana pun yang menyertakan komponen tersebut dapat menjalankannya.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 12k
- Peringkat
- #11497
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
fprime-cmake-build-system
12kMembantu agent Anda menambahkan modul, target build, dan pengaturan platform ke proyek perangkat lunak penerbangan F Prime melalui lapisan CMake-nya.
fprime-component-design-fpp
12kMembantu agent Anda mengubah persyaratan komponen F Prime yang sudah disetujui menjadi model FPP untuk port, perintah, event, dan telemetri-nya.
fprime-component-development
12kMembantu agent Anda memandu komponen F Prime melalui setiap fase pengembangan, dari persyaratan hingga tes integrasi.
fprime-component-implementation
12kMembantu agent Anda menulis kode C++ di balik fungsi handler yang dihasilkan untuk komponen F Prime, dengan mengikuti aturan proyek.
Skill serupa
test-driven-development
311kMengajari agent Anda menulis tes yang gagal dulu, melihatnya gagal, lalu menulis kode terkecil yang lulus, sebelum membangun fitur atau perbaikan apa pun.
verification-before-completion
311kMengajari agent Anda menjalankan pemeriksaan nyata dan membaca keluarannya sebelum menyatakan tugas, perbaikan, atau build sudah selesai atau lulus.
migrate-to-shoehorn
310kMengganti type cast berisiko di file tes Anda dengan pustaka shoehorn, sehingga tes bisa memakai data parsial dan tetap lulus pemeriksaan tipe.