All new development takes place on <feature>
branches off master
. Once feature development on the branch is complete, the feature branch is submitted to master
as a PR. The PR is reviewed by maintainers and testing is performed by the reviewer (see the Testing section for more information).
Changes to the master
branch must be done through an approved PR. Delete branches after merging to keep the repository clean.
Testing MUST be performed when a PR contains changes to the CQL or knowledge artifacts. The PR author SHOULD test their changes and the reviewer MUST test the changes before approving and merging the PR. Testing is performed using the Thunder Client test suite located at the root of this project (thunder-tests
directory).
Follow the following steps to run the test suite:
- Install the Thunder Client VSCode extension
- Navigate to the Thunder Client extension by clicking on the lightning bolt icon in the left sidebar menu
- Set the
fhirServer
andcdsHooksServer
environment variables by navigating to theEnv
tab and selecting theOPIOID_TEST_LOCAL
environment- The
fhirServer
variable points to the base URL of a FHIR server (used for transaction operations). Note that this endpoint MUST be the same as thefhirServer
property defined in the CDS Hooks requests that are being tested. - The
cdsHooksServer
variable points to a CDS Hooks server discovery endpoint
- The
- Run the _refresh and _updateTestData scripts
- The result of running these operations MUST be committed to the PR either by the PR author or reviewer
- Run the test suite by navigating to the
Collections
tab, click the ellipsis next to theOpioidCDSR4_Test_Suite
collection and selectRun All
- All tests MUST pass before a PR will be approved and merged
To update the test suite, ensure that your Thunder Client extension is configured with Git Sync