Skip to content

Conversation

johngrimes
Copy link
Contributor

@johngrimes johngrimes commented Sep 24, 2025

This PR implements a test runner for SQL on FHIR functionality that executes the tests within the official SQL on FHIR v2 test suite.

It includes the following test classes in both the R4 and R5 modules:

  • SqlOnFhirRunnerTests.java: Parameterised JUnit test runner that loads and executes SQL on FHIR test cases from JSON files
  • TestProvider.java: In-memory FHIR resource provider for test execution
  • TestReportGenerator.java: Generates structured test reports with pass/fail statistics
  • TestStorage.java: Test implementation of SQL on FHIR storage interface

I didn't make any attempt to de-duplicate code here, happy to look at that if you think it is desirable. I also just copied in the SQL on FHIR test cases. We could look at other approaches to this, such as Git submodules, but I didn't want to add this without any precedent within this repository.

The SQL on FHIR tests don't fail the build if they don't pass - they emit a JSON report into the target folder. It would be great if we could publish this to GitHub pages so that we can include it on the implementations page.

There are some failures, I anticipate that we can address these in follow-up PRs once the test reporting is in place.

Resolves FHIR/sql-on-fhir-v2#274

/cc @grahamegrieve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test results for FHIR Build Process / IG Publisher
1 participant