Sha256: a8a1f8e9aa140d2025fcb5f76d371257ea4bb8e3eb0d0294f9a3987ad310ab88

Contents?: true

Size: 1.42 KB

Versions: 3

Compression:

Stored size: 1.42 KB

Contents

require_relative '<%= library_name %>/patient_group'

module <%= module_name %>
  class Suite < Inferno::TestSuite
    id :<%= test_suite_id %>
    title '<%= title_name %> Test Suite'
    description 'Inferno <%= human_name.downcase %> test suite for FHIR'

    # These inputs will be available to all tests in this suite
    input :url,
          title: 'FHIR Server Base Url'

    input :credentials,
          title: 'OAuth Credentials',
          type: :oauth_credentials,
          optional: true

    # All FHIR requests in this suite will use this FHIR client
    fhir_client do
      url :url
      oauth_credentials :credentials
    end

    # All FHIR validation requsets will use this FHIR validator
    validator do
      url ENV.fetch('VALIDATOR_URL')
    end

    # Tests and TestGroups can be defined inline
    group do
      id :capability_statement
      title 'Capability Statement'
      description 'Verify that the server has a CapabilityStatement'

      test do
        id :capability_statement_read
        title 'Read CapabilityStatement'
        description 'Read CapabilityStatement from /metadata endpoint'

        run do
          fhir_get_capability_statement

          assert_response_status(200)
          assert_resource_type(:capability_statement)
        end
      end
    end

    # Tests and TestGroups can be written in separate files and then included
    # using their id
    group from: :patient_group
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
inferno_core-0.4.33 lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt
inferno_core-0.4.32 lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt
inferno_core-0.4.31 lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt