FHIR Chat · Running the FHIR Test Cases · committers

Stream: committers

Topic: Running the FHIR Test Cases


view this post on Zulip Kenneth Myhra (Nov 15 2021 at 20:55):

Hey, I'm trying to run the FHIR test cases from https://github.com/FHIR/fhir-test-cases/ locally.

I have executed mvn install, but I am apparently to unfamiliar with the Maven and Java stack to wrap my head around how I can execute the package in the .\target folder.

How do I execute the test cases locally? :)

view this post on Zulip Grahame Grieve (Nov 15 2021 at 21:25):

well, the thing is, you don't execute the test cases directly - they exist to be used by the automated test suites of actual libraries

view this post on Zulip Grahame Grieve (Nov 15 2021 at 21:25):

what is it you want to test?

view this post on Zulip Kenneth Myhra (Nov 16 2021 at 07:14):

I was going to add new test cases (PATCH) for FHIR-33256 and FHIR-33232 and wanted to run them locally first

view this post on Zulip Vadim Peretokin (Nov 16 2021 at 07:16):

Where does the Java library run them?

view this post on Zulip Grahame Grieve (Nov 16 2021 at 18:24):

the java library runs a series of test cases as part of it's maven build. Just get the hapi core repo locally, and run mvn install at the root of the repo. That will run the tests as committed and released through maven.

To run a custom set of tests - your locally modified test cases, se the environment variable FHIR-TEST-CASES to the local directory where you have the test cases, and the java tests will use those instead.

view this post on Zulip Grahame Grieve (Nov 16 2021 at 18:28):

but the full maven build takes 20 minutes, and the patch test is one of 1000s. To run just the patch test, set up a development environment - intellij or eclipse, and import the core maven project, and then run just ....

view this post on Zulip Grahame Grieve (Nov 16 2021 at 18:28):

well, it turns out that there's no java test cases for that. weird.

view this post on Zulip Grahame Grieve (Nov 16 2021 at 18:29):

and nor are those test cases hooked into the test.fhir.org test suite right now. I'll rectify that today

view this post on Zulip Grahame Grieve (Nov 17 2021 at 08:00):

hmm @Peter Jordan points out that content is already mandatory. I didn't check because it wasn't being flagged as an error in at least two contexts. Clearly I have more work to do :sad:

view this post on Zulip Grahame Grieve (Nov 17 2021 at 08:00):

so that's not a change

view this post on Zulip Grahame Grieve (Nov 17 2021 at 22:06):

those last two items belong in another stream

view this post on Zulip Grahame Grieve (Nov 17 2021 at 22:07):

@Kenneth Myhra the test.fhir.org server runs those test cases now, but running them that way isn't documented :-(. I'll try and find time to document that soon

view this post on Zulip Kenneth Myhra (Nov 18 2021 at 07:23):

Thanks, Grahame, I will try it out


Last updated: Apr 12 2022 at 19:14 UTC