Testing HFS

SkillDatabases & data

Plan, run, or debug tests in the Helios HFS Rust workspace. Use for cargo test selection, FHIRPath tests, SQL-on-FHIR tests, persistence integration tests, testcontainers, tenant isolation, Elasticsearch test tuning, and test data locations.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Testing HFS skill

What this skill tells your AI

The instructions your AI receives, as published by heliossoftware/hfs in .agents/skills/test-hfs/SKILL.md and read by ahel’s review.

Use this for test strategy, test setup, and test commands across this workspace.

General Commands

# Run all default workspace tests
cargo test

# Run tests with all FHIR versions
cargo test --features R4,R4B,R5,R6

# Run a specific crate
cargo test -p helios-sof
cargo test -p helios-fhirpath
cargo test -p helios-persistence

# Run tests matching a name pattern
cargo test test_name_pattern

# Run a test target
cargo test --test test_file_name

# Show test output
cargo test -- --nocapture

Patterns

FHIRPath

  • Test cases live in crates/fhirpath/tests/.
  • Official FHIR test cases come from the fhir-test-cases repository.

SQL-on-FHIR

  • Unit tests live in src/ files.
  • Integration tests live in tests/.

Persistence

  • Integration tests use testcontainers for PostgreSQL and Elasticsearch, so Docker is required.
  • Use tokio::sync::OnceCell for shared containers across tests: one container per test binary.
  • Isolate test data with unique UUID-based prefixes or tenant IDs instead of separate containers.
  • Cap Elasticsearch JVM heap with ES_JAVA_OPTS=-Xms256m -Xmx256m.

pysof

cd crates/pysof
uv run pytest python-tests/ -v
cargo test

Test Data

  • FHIR examples live in crates/fhir/tests/data/.
  • Search parameter definitions live in data/search-parameters-{r4,r4b,r5,r6}.json.
  • ViewDefinition examples are embedded in test files.

Signals

GitHub stars
51
Forks
19
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
test-hfs
Source
github.com/heliossoftware/hfs