Using with Continuous Integration Systems - onc-healthit/inferno-community GitHub Wiki
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"
]
}