fprime-component-integration-test
Qué hace
Guía a la IA para escribir pruebas de integración que envían comandos y comprueban eventos y telemetría a través del sistema de tierra. Está pensada para ingenieros que prueban componentes de F Prime.
Cuándo usarla
- ✓Cuando las pruebas unitarias pasan y un componente de F Prime necesita pruebas de integración.
- ✓Cuando quieres pruebas que envíen comandos a un despliegue de F Prime en marcha.
- ✓Cuando necesitas revisar los eventos y la telemetría de un componente en un sistema activo.
Link de la skill
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-integration-test/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes escribir pruebas de integración con pytest que envíen el comando y comprueben el evento de este componente de F Prime?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA prepara un archivo de prueba en la carpeta del componente, usa la API de pruebas del sistema de tierra para enviar comandos y leer eventos y telemetría, y luego ejecuta las pruebas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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)
Preguntas frecuentes
¿Las pruebas necesitan un sistema en marcha?
Sí. El despliegue debe estar en ejecución a través del sistema de datos de tierra antes de que se ejecuten las pruebas.
¿Estas pruebas cubren flujos de todo el sistema?
No. Cubren un solo componente, y las pruebas de todo el sistema son un tema aparte.
¿Dónde viven las pruebas?
Están en la carpeta test/int del propio componente, así que cualquier despliegue que incluya el componente puede ejecutarlas.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 12 mil
- Posición en el ranking
- #11497
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
fprime-cmake-build-system
12 milAyuda a tu agente a añadir módulos, objetivos de compilación y ajustes de plataforma a un proyecto de software de vuelo F Prime a través de su capa de CMake.
fprime-component-design-fpp
12 milAyuda a tu agente a convertir los requisitos aprobados de un componente de F Prime en un modelo FPP de sus puertos, comandos, eventos y telemetría.
fprime-component-development
12 milAyuda a tu agente a guiar un componente de F Prime por cada fase de desarrollo, desde los requisitos hasta las pruebas de integración.
fprime-component-implementation
12 milAyuda a tu agente a escribir el código C++ detrás de las funciones manejadoras generadas de un componente de F Prime, siguiendo las reglas del proyecto.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.