Skip to content

implement test suite #7

@litlfred

Description

@litlfred

FML Execution Validation Test Suite Requirements

Purpose

Define a FHIR IG-based validation test suite for FML using FHIR TestPlan, with real-world test cases sourced (with license compliance) from community FML projects.

Directory Structure

  • FSH TestPlan: input/fsh/tests/FMLExecutionValidationTestPlan.fsh
  • Test Data: input/testdata/
    • All imported test cases will be stored here, with subfolders as needed.
    • License and attribution headers must be preserved and included at the top of every imported file.

Test Data Sources

Importing from ahdis/matchbox and FHIR/fhir-test-cases

How are input, output, and map files connected?

  • In fhir-test-cases/r5/structure-mapping:
    • Test cases are often defined by filename conventions or manifest files (e.g., YAML or JSON manifests).
    • Common pattern:
      • *-map.txt or .map — FML mapping specification
      • *-input.json or .xml — FHIR resource to be mapped
      • *-output.json or .xml — Expected output after applying the map
      • Sometimes, a manifest or README describes more complex scenarios or links files together.
    • Mapping strategy:
      • When importing, pair files with the same base name, e.g. patient-map.txt, patient-input.json, patient-output.json.
      • For ambiguous cases, consult any manifest/readme, or use the test specification logic from the source repository.

TestPlan/TestScript Design

  • Each test case in FML Execution Validation:
    • References a map file, an input file, and an expected output file.
    • Uses FHIRPath assertions for output validation.
  • All file references are relative to input/testdata/.

Attribution & License Compliance

  • Each imported file must include, at the top:
    • Source repository and URL
    • Original license statement (Apache 2.0 for matchbox, HL7 copyright/license for fhir-test-cases)
    • A statement of compliance with original contribution requirements.

To Do

  • Script/process to import and attribute test data from @ahdis/matchbox and FHIR/fhir-test-cases
  • Explicitly map .map files to their input/output test cases
  • Draft FSH TestPlan/TestScript resources
  • Migrate all relevant tests and update documentation
  • update the README and documentation to add reference to where the resulting published testplan documentation will live on gh-pages.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions