FHIR Chat · Can't figure out why test fails · crucible

Stream: crucible

Topic: Can't figure out why test fails


view this post on Zulip Mikhail Lapshin (Jan 31 2019 at 15:09):

Hello guys! I'm running Crucible against Aidbox FHIR server and all of 'Base Resources' tests are failing on vread interaction, and I can't understand why. The permalink to one of failed tests is: https://projectcrucible.org/servers/5c3c642504ebd041c500001a#5c51eb7a04ebd028cd000006/resourcetest_device/X040_Device

UI says that failure reason is: "Service did not respond with bundle", but I'm pretty sure that response contains a valid history Bundle (you can see it in request inspector). Thanks in advance for any suggestions.

view this post on Zulip Jason Walonoski (Jan 31 2019 at 16:54):

The weird thing is that the history request is made using XML, but all the other requests are JSON. Attention @Robert Scanlon

view this post on Zulip Robert Scanlon (Jan 31 2019 at 18:15):

Hmmm, this error is generically "for some reason I can't parse the response as a Bundle". It could be a structural issue with the XML, or it is missing required bundle fields. The error message isn't very helpful

view this post on Zulip Robert Scanlon (Jan 31 2019 at 18:15):

https://github.com/fhir-crucible/plan_executor/blob/master/lib/tests/suites/resource_test.rb#L406

view this post on Zulip Robert Scanlon (Jan 31 2019 at 18:19):

As soon as I have a chance I'll try loading it up directly through the fhir models to see if I can get more specifics: https://github.com/fhir-crucible/fhir_models#resource-basics

view this post on Zulip Robert Scanlon (Jan 31 2019 at 18:19):

And we'll have to investigate why the client is doing xml in that case as well. That is strange.

view this post on Zulip Mikhail Lapshin (Feb 01 2019 at 14:30):

As soon as I have a chance I'll try loading it up directly through the fhir models to see if I can get more specifics: https://github.com/fhir-crucible/fhir_models#resource-basics

Just tried to do this and looks like XML file is parsed correctly into the FHIR::Bundfle instance. Here is the source XML document generated by Aidbox and the output of FHIR.from_contents() call:
https://gist.github.com/mlapshin/e2a4c6b8d394c0701d4ca52a2763ca04

There are couple of strange log lines complaining about errors, but no exceptions at all.

view this post on Zulip Robert Scanlon (Feb 01 2019 at 16:26):

This is definitely a problem with Crucible. We have actually fixed this in one of the underlying libraries already, but those changes haven't been deployed yet to projectcrucible.org. I'll update this thread when we deploy the new version. Thanks for your patience!

view this post on Zulip Mikhail Lapshin (Feb 01 2019 at 16:28):

Thanks @Robert Scanlon

view this post on Zulip Robert Scanlon (Feb 01 2019 at 16:31):

(if you would like to see it working right now, you can clone plan_executor, do bundle install, and then run bundle exec rake crucible:execute[https://openedbox.aidbox.app/fhir/,:stu3,ResourceTest,Device])

view this post on Zulip Mikhail Lapshin (Feb 04 2019 at 15:02):

Looks like it's fixed in master:

ResourceTest_Device
      PASS x000_read_type_test:
      PASS x010_create_new_test: New Device was created.
      PASS x012_conditional_create_(no_matches)_test: New Device was created.
      PASS x013_conditional_create_(one_match)_test: Request was correctly ignored.
      PASS x014_conditional_create_(multiple_matches)_test: Request correctly failed.
      PASS x020_read_existing_test: Successfully read preexisting Device.
      PASS x030_update_existing_test: Updated existing Device.
      PASS x032_conditional_update_(no_matches)_test: New Device was created.
      PASS x033_conditional_update_(one_match)_test: Updated existing Device.
      PASS x034_conditional_update_(multiple_matches)_test: Request correctly failed.
      PASS x040_read_history_of_existing_test: Service responded with bundle.
      PASS x050_version_read_existing_test: Read current version of preexisting Device.
      PASS x055_previous_version_read_existing_test: Read previous version of preexisting Device.
      PASS x060_validate_test: Device was validated.
      PASS x065_validate_existing_test: Existing Device was validated.
      PASS x067_validate_against_a_profile_test: Device was validated.
      PASS x070_delete_existing_test: Existing Device was deleted.
      PASS x075_get_deleted_resource_test: Deleted Device was correctly reported as gone.
Execute ResourceTest completed in 21.671793000015896 seconds.

Looking forward to see it deployed on projectcrucible.org. Thanks for your cooperation, Robert!


Last updated: Apr 12 2022 at 19:14 UTC