Minimum

Minimum assertions are efficient in that it relieves the author from performing many individual path evaluations against the payload and comparing those results to a set of expected values. The author would define one fixture that contains all of the expected elements in the request or response payload and would then reference this fixture as minimumId.

The assertion can be performed on request and response variables offered by the Touchstone Rules-Engine.

  • assertMinimum(mimimumId)

    • Asserts that the payload contains all the element/content in another fixture pointed to by the provided minimumId. This can be a statically defined fixture or one that is dynamically set via responseId during TestScript execution.

    • Example:

      response.assertMinimum("patient-create-PeterChalmers-min")
      
    • Equivalent to these:

      assertMinimum("patient-create-PeterChalmers-min", response)
      

Note that in both of the examples above, the fixture “patient-create-PeterChalmers-min” is expected to have been defined and uploaded to Touchstone. See the test script connectathon-18-patient-base-client-id-json for an example on how minimumId assertion is performed in TestScript and how the minimumId fixture is defined:

  • Minimum assertion definition in TestScript:

../../../_images/assert-min-def.png
  • Minimum fixture definition in TestScript:

../../../_images/assert-min-fixture.png
  • Fixture contents for patient-create-PeterChalmers-min.json can be found here