Skip to content

Migration Guide

Migrate from other FHIR testing tools to FHIR Frog.

From Touchstone / Crucible

Touchstone and Crucible use standard FHIR TestScript JSON, which FHIR Frog reads natively.

1. Copy TestScript files

cp touchstone-tests/*.json src/test/resources/fhir/

2. Add FHIR Frog dependency

<dependency>
    <groupId>org.fhirfrog</groupId>
    <artifactId>fhir-frog-library</artifactId>
    <version>0.1.1-SNAPSHOT</version>
    <scope>test</scope>
</dependency>

3. Create a JUnit test

@ExtendWith(FhirFrogExtension.class)
class MigratedTests {

    @FhirTestConfig(serverUrl = "${fhir.server.url}",
                    fixtureBasePath = "src/test/resources/fhir")
    @TestTemplate
    @TestScriptSource("fhir/patient-crud.json")
    void patientCrud() { }
}

Known differences

Feature Touchstone FHIR Frog
Hosting Cloud (HL7) Local / CI
TestScript source Upload to portal Local filesystem
Profiles Downloaded from registry Local or server
Results Portal UI JUnit + TestReport JSON

From Hand-Written HTTP Tests (REST Assured, OkHttp)

Before (REST Assured)

@Test
void createPatient() {
    Response response = given()
        .contentType("application/fhir+json")
        .body(patientJson)
        .when().post("/Patient")
        .then().statusCode(201)
        .extract().response();

    String id = response.jsonPath().getString("id");

    given()
        .when().get("/Patient/" + id)
        .then().statusCode(200)
        .body("name[0].family", equalTo("Smith"));
}

After (FHIR Frog TSH)

TestScript: PatientCRUD
Status: #draft
Fixture: patient from "fixtures/patient.json"

Setup:
  * operation create Patient from patient as created
  * assert response = created
  * variable patientId = Patient.id from created

Test: "Read patient"
  * operation read Patient/${patientId} as readResponse
  * assert response = okay
  * assert Patient.name.family = "Smith"

Benefits of migration: - Tests expressed in FHIR concepts, not HTTP specifics - Portable to any FHIR server without code changes - Produces standard FHIR TestReport output - Shippable inside an Implementation Guide


From JSON TestScript to TSH

See the JSON → TSH migration guide and JSON → TPH migration guide for syntax conversion tables.


From Maven Surefire Tests to Ant Build

If your team uses the FHIR IG Publisher (Ant-based), migrate from Maven test runs to the Ant task for tighter IG integration:

Before (Maven)

mvn test -Dtest=ConformanceSuiteIT

After (Ant)

ant test    # init + bootstrap + execute TestPlans

See Ant Task for the full build file setup.


Version Upgrades

0.1.x → 0.2.x

(No breaking changes yet — this section will be updated with each release.)

Getting Help