Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Using with Continuous Integration Systems

radamson edited this page Sep 27, 2018 · 1 revision

Inferno can be used in a number of ways to test servers and aid in development. This page provides examples for some (of many ways) to integrate Inferno in CI systems.

Using with Travis CI

Inferno can be used at any step of the Travis CI Build Lifecycle, but in order to have Inferno actually break the build it must be used in either the before_install, install, before_script, or script steps.

After registering your project with the Travis CI instance you are using, only a few modifications are needed to the .travis.yml.

An example is shown below:

node_js:
  - "node"

script:
  # Yarn Tests
  - yarn test

  # Inferno Tests
  - rvm install ruby --latest
  - yarn start &
  - git clone --single-branch -b development https://github.com/siteadmin/inferno.git
  - cd inferno
  - bundle install
  - rake inferno:execute_batch[../.inferno.json]

This will run a scripted test against your server based on the configurations in .inferno.json.

An example .inferno.json is shown below:

{
  "server": "http://localhost:3000",
  "arguments": {
    "client_name": "Inferno",
    "initiate_login_uri": "http://localhost:3000/launch",
    "redirect_uris": "http://localhost:3000/redirect",
    "scopes": "launch launch/patient offline_access openid profile user/*.* patient/*.*",
    "confidential_client": true,
    "standalone_launch_script": [
        {"cmd": "send_keys", "type": "name", "find_value": "email", "value": "[email protected]"},
        {"cmd": "send_keys", "type": "name", "find_value": "password", "value": "xxx"},
        {"cmd": "click", "type": "tag_name", "find_value": "button", "index": 3},
        {"cmd": "click", "type": "class", "find_value": "patient-row", "index": 1},
        {"cmd": "click", "type": "name", "find_value": "authorize"}
    ]
  },
  "sequences": [
    "Conformance",
    "DynamicRegistration",
    "PatientStandaloneLaunch",
    "ArgonautPatient"
  ]
}