Getting Started with fhir-test-cases

Overview

This project contains cases that can be used to test FHIR reference implementations/validators. This project uses Maven as its build tool. Note that although this project compiles to Java based artifacts, there is no actual Java code included. Maven packages the included files such that they can be accessed as a Maven dependency by other projects.

Repository

https://github.com/FHIR/fhir-test-cases/

Prerequisites

Git

You should clone the project locally using git.

git clone https://github.com/hapifhir/org.hl7.fhir.core.git

You will need a Git CLI or a Git Client installed. A general introduction to Git can be found here

IntelliJ Users

  1. Ensure you have the latest version of Intellij IDEA Community Edition installed. Check the current version on their downloads page.
  2. Follow these steps to import the cloned project:
    • From the main menu, select File -> Open...
    • In the browser dialog pick the fhir-test-cases directory (the root of the project)
    • If prompted whether to Trust and Open Project 'fhir-test-cases' select Trust Project
    • Select which window you would like to open the project in.

This should enable the building and running of tests in IntelliJ. To verify, in the Maven side panel, right click on HL7 Core Artifacts -> Lifecycle -> clean and select Run Maven Build from the context menu.

Apache NetBeans Users

  1. Follow the steps in the Intellij Users section above.

Eclipse Users

  1. Ensure you have the latest version of Eclipse installed. Check the current version on their downloads page.
  2. Run eclipse and select your Eclipse workspace.
  3. Follow these steps to import the cloned project:
    • From the main menu, select File -> Import...
    • Select Maven -> Existing Maven Projects
    • Click Next
    • Under Select Root Directory, pick the fhir-test-cases directory (the root of the project)
    • Click Finish
  4. If you are prompted to install the m2e-connector plugin, or the maven-checkstyle-plugin plugin connector, you should do so, and approve any necessary and valid code signings. You may be asked to restart Eclipse at this point, and you should do so.

This should import the project, and you should be able to build and run of test in the Eclipse IDE. To verify, in the Project drop-down menu, select Clean.... In the Clean window, select the Clean all projects option, and the Start a build immediately and Build the entire workspace options as well. Press Clean to run a full build.

Updated: