Skip to content
Source code for the Inferno Testing Tool
Ruby CSS HTML JavaScript Other
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github move PR template Sep 11, 2019
data Restructure models. Dec 18, 2017
deployment-files autocorrect linting errors May 31, 2019
generator Rearrange community us core tests in interface. Jan 3, 2020
lib Merge pull request #404 from onc-healthit/update-version-2.9 Jan 3, 2020
public Remove styles that are no longer necessary Dec 5, 2019
resources Remove bmi, oxygensat vitalspanel for now because not USCDI reqs. Dec 10, 2019
sample-data Adding sample test data for FHIR servers May 31, 2018
test Merge pull request #378 from onc-healthit/FI-463-HL7-validator-integr… Dec 31, 2019
.codeclimate.yml update configuration to include code climate Jul 25, 2019
.gitattributes add bdt sequences to .gitattributes Nov 21, 2019
.gitignore generate csv output Oct 17, 2019
.rubocop-windows.yml added a rubocop config file for windows to allow windows users to run… Jul 25, 2019
.rubocop.yml update rubocop config Nov 13, 2019
.rubocop_todo.yml update rubocop config Nov 13, 2019
.ruby-version ruby-version Oct 2, 2019
.tool-versions
.travis.yml Remove bundler install. Dec 16, 2019
Dockerfile use bundle exec in Dockerfile Sep 10, 2019
Gemfile remove json-jwt gem and explicitly require the jwt gem Dec 13, 2019
Gemfile.lock bump rack version Jan 3, 2020
LICENSE Initial commit Jan 10, 2017
README.md Move nginx to 4567 in README. Nov 25, 2019
Rakefile update Rakefile to run tests from lib/module Nov 13, 2019
config.ru exclude config.ru from linting May 31, 2019
config.yml Add validator service to docker-compose. Jan 3, 2020
create_umls.sh codeset validation creation Feb 26, 2019
deployment-configuration.md Update GitHub urls to new onc-healthit organization. Jul 24, 2019
docker-compose.yml Add validator service to docker-compose. Jan 3, 2020
introspection client.txt Change all crucible references to Inferno Aug 14, 2018
script_example.json Fix script example. Jun 27, 2019

README.md

Build Status

Inferno is an open source tool that tests whether patients can access their health data through a standard interface. It makes HTTP(S) requests to test your server's conformance to authentication, authorization, and FHIR content standards and reports the results back to you.

This application creates test clients that exercise the range of requirements of a SMART on FHIR server. These clients have tests for the SMART App Launch Framework, Argonaut Implementation Guides, and FHIR DSTU2.

Using Inferno

If you are new to FHIR or SMART-on-FHIR, you may want to review the Inferno Quick Start Guide.

Installation and Deployment

Docker Installation

Docker is the recommended installation method for Windows devices and can also be used on Linux and MacOS hosts.

  1. Install Docker for the host platform as well as the docker-compose tool (which may be included in the distribution, as is the case for Windows and MacOS).
  2. Download the latest release of the inferno project to your local computer on a directory of your choice.
  3. Open a terminal in the directory where the project was downloaded (above).
  4. Run the command docker-compose up to start the server. This will automatically build the Docker image and launch both the ruby server (using unicorn) and an NGINX web server.
  5. Navigate to http://localhost:4567 to find the running application.

If the docker image gets out of sync with the underlying system, such as when new dependencies are added to the application, you need to run docker-compose up --build to rebuild the containers.

Check out the Troubleshooting Documentation for help.

Native Installation

Inferno can installed and run locally on your machine. Install the following dependencies first:

And run the following commands from the terminal:

# MacOS or Linux
git clone https://github.com/onc-healthit/inferno
cd inferno
bundle install
bundle exec rackup

Inferno can then be accessed at http://localhost:4567 in a web browser.

If you would like to use a different port it can be specified when calling rackup. For example, the following command would host Inferno on port 3000:

rackup -p 3000

Remote Deployment

Inferno can also be deployed onto a server to test many different instances of the FHIR Servers by multiple users. Test results are kept private at a unique, unguessable URI that can be saved for future reference or shared.

Deployment on a remote server can be done by using a modified form of the Docker containers provided (see above) or by direct installation on the remote host.

Please see the file deployment-configuration.md for details.

Reference Implementation

While it is recommended that users install Inferno locally, a reference implementation of Inferno is hosted at https://inferno.healthit.gov

Users that would like to try out Inferno before installing locally can use that reference implementation, but should be forewarned that the database will be periodically refreshed and there is no guarantee that previous test runs will be available in perpetuity.

Supported Browsers

Inferno has been tested on the latest versions of Chrome, Firefox, Safari, and Edge. Internet Explorer is not supported at this time.

Unit Tests

Inferno contains a robust set of self-tests to ensure that the test clients conform to the specification and performs as intended. To run these tests, execute the following command:

bundle exec rake test

Inspecting and Exporting Tests

Tests are written to be easily understood, even by those who aren't familiar with Ruby. They can be viewed directly in this repository.

Tests contain metadata that provide additional details and traceability to standards. The active tests and related metadata can be exported into CSV format and saved to a file named testlist.csv with the following command:

bundle exec rake inferno:tests_to_csv

Arguments can be provided to the task in order to export a specific set of tests or to specify the output file.

bundle exec rake inferno:tests_to_csv[onc,all_tests.csv]

To just choose the module and use the default groups and filename:

bundle exec rake inferno:tests_to_csv[onc]

Running Tests from the Command Line

Inferno provides two methods of running tests via the command line: by directly providing the sequences or running automated scripts

Note: This feature is still in development and we are looking for feedback on features and improvements in ways it can be used

Running Tests Directly

Testing sequences can be run from the command line via a rake task which takes the sequence (or sequences) to be run and server url as arguments:

bundle exec rake inferno:execute[https://my-server.org/data,onc,ArgonautConformance]

Running Automated Command Line Interface Scripts

For more complicated testing where passing arguments is unwieldy, Inferno provides the ability to use a script containing parameters to drive test execution. The provided example_script.json shows an example of this script and how it can be used. The execute_batch task runs the script:

bundle exec rake inferno:execute_batch[script.json]

Inferno also provides a generate_script rake task which prompts the user for a series of inputs which are then used to generate a script. The user is expected to provide a url for the FHIR Server to be tested and the module name from which sequences will be pulled.

bundle exec rake inferno:generate_script[https://my-server.org/data,onc]

Caveats

  • For DynamicRegistration users must provide instructions similar to that provided in example_script.json to automate the webdriver.
  • The confidential_client field is a boolean and must be provided as true or false

Using with Continuous Integration Systems

Instructions and examples are available in the Continuous Integration Section of the Wiki.

Contact Us

The Inferno development team can be reached by email at inferno@groups.mitre.org. Inferno also has a dedicated HL7 FHIR chat channel.

License

Copyright 2019 The MITRE Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.