fprime-component-integration-test
Что он делает
Этот скилл направляет ИИ через написание интеграционных тестов, которые отправляют команды и проверяют события и телеметрию через наземную систему. Он предназначен для инженеров, которые тестируют компоненты F Prime.
Когда использовать
- ✓Когда модульные тесты пройдены и компонент F Prime нужно протестировать интеграционно.
- ✓Когда вы хотите тесты, которые отправляют команды запущенной системе F Prime.
- ✓Когда нужно проверить события и телеметрию компонента в работающей системе.
Ссылка на скилл
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-integration-test/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Можете написать интеграционные тесты pytest, которые отправляют команду и проверяют событие для этого компонента F Prime?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
ИИ создаёт файл тестов в папке компонента, использует 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)
Частые вопросы
Нужна ли для тестов работающая система?
Да. Развёртывание должно работать через наземную систему обработки данных до запуска тестов.
Охватывают ли эти тесты сценарии всей системы?
Нет. Они охватывают один компонент, а тесты всей системы — отдельная тема.
Где лежат тесты?
Они находятся в папке 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
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
fprime-cmake-build-system
12kПомогает агенту добавлять модули, цели сборки и настройки платформы в проект бортового ПО F Prime через его слой CMake.
fprime-component-design-fpp
12kПомогает агенту превратить утверждённые требования к компоненту F Prime в модель FPP его портов, команд, событий и телеметрии.
fprime-component-development
12kПомогает агенту провести компонент F Prime через каждую фазу разработки: от требований до интеграционного тестирования.
fprime-component-implementation
12kПомогает агенту написать C++-код для обработчиков компонента F Prime, которые генерируются автоматически, по правилам проекта.
Похожие скиллы
test-driven-development
311kУчит агента сначала писать падающий тест, увидеть, что он падает, и только затем писать минимальный код, который его проходит, прежде чем создавать любую функцию или исправление.
verification-before-completion
311kУчит агента запускать настоящие проверки и читать их вывод, прежде чем утверждать, что задача, исправление или сборка готовы или проходят.
migrate-to-shoehorn
310kЗаменяет рискованные приведения типов в тестовых файлах на библиотеку shoehorn, чтобы тесты могли использовать неполные данные и проходить проверку типов.