Blog

    Testing a FHIR Implementation With Inferno, Step by Step: Test Kits, Local Runs, Common Failures and CI Release Gates

    By GauravJuly 25, 20269 mins read
    On this page

    Many teams meet Inferno once, in the weeks before ONC certification, and then forget it until the next audit. That wastes the most useful property of the tool: it can test the same FHIR server the same way on every release, long before anyone outside the team sees a failure.

    This post is for engineers who run FHIR servers or APIs and want Inferno in their normal workflow. It covers choosing test kits beyond (g)(10), running them locally, reading failures, fixing the server errors Inferno finds most often, and gating releases with Inferno in CI.

    What is Inferno testing for a FHIR implementation?

    Want FHIR tests in every release?

    Our test automation services cover API and conformance test suites that run in your pipeline, including FHIR servers and clients.

    Inferno testing is running ONC's open source Inferno test kits against a FHIR server or client to check conformance with a specific implementation guide, such as US Core or SMART App Launch, either in a browser session or from the command line. Agnotic Technologies sets Inferno up so these checks run before every release.

    Inferno does not replace your own tests. It checks what the specification requires; your own tests check what your product promises.

    Which Inferno test kits fit your system?

    The right test kits are the ones matching the implementation guides your system claims to support, in the role it plays. A payer API, an EHR's patient API and a SMART app each need a different set.

    Inferno on HealthIT.gov lists test kits well beyond the ONC (g)(10) Standardized API Test Kit, including US Core, SMART App Launch, Bulk Data, Subscriptions, CARIN IG for Blue Button and several Da Vinci test kits such as PAS, CRD, DTR and PDex.

    • EHR patient and population APIs: (g)(10), US Core, SMART App Launch and Bulk Data.
    • Payer APIs: CARIN IG for Blue Button, Da Vinci PDex, Plan Net and Drug Formulary.
    • Prior authorization: the Da Vinci CRD, DTR and PAS kits, for servers and clients.
    • Event-driven systems: the Subscriptions kit.

    Pin the kit version to the guide version you implement. A kit built for a newer US Core release will report failures for behavior your release never claimed.

    How do you run Inferno locally?

    Run Inferno locally with Docker, using the scripts in each test kit's repository. A local instance can reach development servers that a hosted instance cannot, and it keeps test data inside your network.

    Inferno's documentation says most test kits run locally by installing Docker, cloning the test kit's repository, running ./setup.sh to fetch the Docker images and create a database, running ./run.sh to start Inferno, and opening it at http://localhost.

    • Step 1, Docker: install it on the machine or build agent that will run tests.
    • Step 2, kit: clone the test kit repository at the tag matching your guide version.
    • Step 3, setup: run the setup script once to pull images and create the database.
    • Step 4, run: start Inferno and open the local address in a browser.
    • Step 5, combine: use the Inferno template to load several kits into one instance if you need them together.

    Check each kit's own documentation before the first run. Kits that validate profiles need the matching implementation guide package available to the validator, and some kits list extra setup steps.

    Configuring a test session

    A test session needs the server's base URL, credentials Inferno can use, and patients whose data covers every profile in scope. Most early failures are configuration, not code.

    • Base URL and discovery: the FHIR endpoint and its SMART configuration reachable from the Inferno host.
    • Client registration: a test client with the scopes the kit requests.
    • Test patients: ids for patients whose records include every must support element.
    • Saved inputs: session inputs stored in a file so every run uses the same values.

    Keep test credentials and patients separate from production. A conformance run makes many requests in a short time, and a test client with production scopes is a risk nobody needs.

    How do you read Inferno failures?

    Read Inferno failures from the top of the group down, because one early failure often explains many later ones. A failed authorization or missing patient makes every search test after it fail too.

    • Check the request: Inferno shows each HTTP request and response; read the status and body first.
    • Separate fail from skip: a skip often means missing test data, not broken behavior.
    • Read validator messages: profile errors name the element path and the rule broken.
    • Note warnings: they do not fail the run, but they often become failures in the next kit version.

    Record each failure with the request, the expected behavior and the fix. After a few releases, that list shows which parts of the server break most often and where your own unit tests should be stronger.

    Which server errors does Inferno find most often?

    The most common errors are gaps between what the server advertises and what it does. The CapabilityStatement promises a search, and the server returns an error or ignores a parameter.

    • Unsupported search combinations: patient and category work, but adding a date range fails.
    • Date prefixes ignored: searches with ge or lt return everything instead of a filtered set.
    • Missing must support data: elements absent because the test patients lack them, or because mapping drops them.
    • Wrong codes: values outside required value sets, often from local codes passed through unmapped.
    • Discovery gaps: SMART configuration missing capabilities or scopes the server actually supports.

    Fix the server, not the test data, unless the data really is incomplete. Padding patients to pass hides mapping bugs that real records will expose.

    How do you add Inferno to CI?

    Add Inferno to CI by starting its services in the pipeline, deploying the server build under test, then running the chosen suites from the command line and failing the build on a non-zero exit. That turns conformance into a release gate.

    Inferno offers two command line options for pipelines: inferno execute runs a single suite, group or test and exits with status 0 if the Inferno summarizer deems it a pass, while inferno execute_script handles more complex runs that can involve several sessions.

    • Services: start Inferno's background services and wait until they are ready.
    • System under test: deploy the build to a test environment seeded with fixed test patients.
    • Run: call the command line for each suite in scope, with saved inputs.
    • Gate: block the release when the exit code is not zero, and keep the results as build artifacts.

    TLS tests are a known gap in pipelines. Inferno's documentation describes an environment setting that marks them omitted in CI; run them separately against a real deployment.

    What goes wrong when teams rely on Inferno?

    Problems come from treating a passing run as proof of more than it tests. Inferno checks conformance with the guide, not clinical correctness or performance.

    • Passing on padded data: test patients built to pass, while real patients miss elements.
    • Kit drift: the kit updated to a newer guide version without anyone noticing, causing confusing failures.
    • One-time runs: Inferno used only before certification, so regressions ship unnoticed.
    • Ignored warnings: warnings left for months until a kit update turns them into failures.

    The fix is routine rather than heroic. Run real-shaped data, pin and update kits on purpose, run on every release and give warnings an owner and a date, the same way you treat failing unit tests.

    A worked example: a payer API release

    A health plan's engineering team exposes a patient access API and runs CARIN Blue Button and US Core kits by hand before certification. Six months later, a refactor breaks a date search, and members report missing claims in a third-party app.

    The team moves both kits into CI with pinned versions, fixed test members and saved inputs. Every merge to the release branch now runs the suites against a test deployment and blocks on failure.

    The next regression, a missing must support element after a mapping change, fails the build the same day and never reaches members.

    Who owns Inferno test setup and fixes?

    Inferno testing touches the API team, quality engineering and whoever owns compliance. Each owns a piece of the setup.

    • API team: fixing failures and keeping the CapabilityStatement honest.
    • Quality engineering: kit versions, saved inputs, the CI job and result storage.
    • Data team: test patients that cover every profile and element in scope.
    • Compliance or product: which guides and versions the product claims to support.

    When a kit update is due, quality engineering runs it on a branch first and shares the new failures with the API team, so the update lands with fixes rather than a red build.

    Measuring conformance over time

    Track pass, fail and skip counts per suite on every build, and watch warnings as a leading signal. A rising skip count usually means test data has drifted.

    Keep results with each release, so a customer or auditor asking which guide version a release passed gets an answer from records, not memory. Store the kit version and saved inputs with the results, so any past run can be repeated exactly.

    What are Inferno testing best practices?

    Choose kits by the guides and roles your system claims, pin kit versions, and run them locally against development servers. Save session inputs and maintain test patients that cover every profile.

    Run the suites in CI with exit codes as a release gate, fix the server rather than padding data, and review warnings before kit updates turn them into failures.

    How can Agnotic help set up Inferno testing?

    Agnotic sets up Inferno for FHIR teams: kit selection, local and CI runs, saved inputs, test patients and release gates, and fixes for the server errors that appear. We also add product-specific tests beside Inferno so conformance and behavior are both covered.

    Put FHIR conformance in your pipeline

    We build FHIR servers and the tests that keep them conformant.

    Sources

    Frequently Asked Questions

    No. Inferno lists many test kits, including US Core, SMART App Launch, Bulk Data, Subscriptions, CARIN Blue Button and several Da Vinci guides.

    Talk to an engineer about your project

    Tell us which FHIR guides your system supports. We will outline the Inferno kits and CI gates to add.