Agent Skillsnasa/fprime › fprime-component-integration-test

fprime-component-integration-test

GitHub

指导在F Prime组件开发中,使用pytest和GDS API编写可复用的集成测试。涵盖测试目录设置、用例编写、需求覆盖及运行流程,确保组件在部署环境中正确交互。

.github/skills/fprime-component-integration-test/SKILL.md nasa/fprime

Trigger Scenarios

单元测试通过且组件准备进行集成测试时 需要为F Prime组件编写基于GDS的集成测试时

Install

npx skills add nasa/fprime --skill fprime-component-integration-test -g -y
More Options

Non-standard path

npx skills add https://github.com/nasa/fprime/tree/devel/.github/skills/fprime-component-integration-test -g -y

Use without installing

npx skills use nasa/fprime@fprime-component-integration-test

指定 Agent (Claude Code)

npx skills add nasa/fprime --skill fprime-component-integration-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add nasa/fprime --all -g -y

预览 repo 内 skill

npx skills add nasa/fprime --list

SKILL.md

Frontmatter
{
    "name": "fprime-component-integration-test",
    "description": "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."
}

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 events
  • assert_event() / assert_telemetry() — verify component output
  • get_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)

Version History

  • 7d8f579 Current 2026-08-20 11:33

Same Skill Collection

.github/skills/agent-skill-authoring/SKILL.md
.github/skills/ai-session-report/SKILL.md
.github/skills/ai-session-summary/SKILL.md
.github/skills/ci-test-runtime-policy/SKILL.md
.github/skills/fprime-cmake-build-system/SKILL.md
.github/skills/fprime-component-design-fpp/SKILL.md
.github/skills/fprime-component-development/SKILL.md
.github/skills/fprime-component-implementation/SKILL.md
.github/skills/fprime-component-requirements/SKILL.md
.github/skills/fprime-component-unit-test/SKILL.md
.github/skills/fprime-ground-input-tracing/SKILL.md
.github/skills/fprime-hardware-input-tracing/SKILL.md
.github/skills/fprime-topology-development/SKILL.md
.github/skills/fprime-unit-testing/SKILL.md
.github/skills/jpl-design-principles/SKILL.md
.github/skills/maintainer-lookup/SKILL.md
.github/skills/post-inline-review/SKILL.md
.github/skills/pr-diff-scoping/SKILL.md
.github/skills/prompt-injection-precheck/SKILL.md
.github/skills/re-review-state/SKILL.md
.github/skills/triage-classifier/SKILL.md
.github/skills/write-system-functional-doc/SKILL.md
.github/skills/fprime-cpp-design/SKILL.md

Metadata

Files
0
Version
736c365
Hash
3b55edbc
Indexed
2026-08-20 11:33

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 06:45
浙ICP备14020137号-1