Bahmni LITE API Tests
Bahmni LITE API tests are available in main
branch of repository https://github.com/Bahmni/bahmni-e2e-tests/
API tests run in GitHub actions whenever a smoke or regression test is executed.
To run API tests against Bahmni LITE manually use command gauge run specs --tags "api" --env dev.lite
Why API Tests?
Our UI test suite for Bahmni is composed of end-to-end tests, which means it doesn't cover all the application flows. To ensure complete coverage without increasing test execution time, we introduced API tests. Currently, we have enabled the test framework to include API tests and have covered a few modules, such as login and registration. In the future, we plan to cover other modules as well and increase the API test coverage.
Scenarios covered under API tests
Bahmni Lite API tests are tagged as api
. All API tests are available here - https://github.com/Bahmni/bahmni-e2e-tests/tree/main/specs/API .
The Github actions are configured to run these tests along with UI tests whenever a smoke or regression test is executed, the results can be viewed at https://github.com/Bahmni/bahmni-e2e-tests/actions/workflows/BahmniLite_E2E_Test.yml.
List of scenarios covered - API Test Scenarios
Roadmap-
As part of API test we have covered Login, registration and one form in Consultation, other forms in consultations, medications, diagnoses, Lab/Radiology Order also to be added in test suite.
Other module like Lab Entry, Appointments, patient documents & reports to be included in test suite.
The HTML report of API tests are not stored in GitHub actions whenever a UI tests are executed, this needs to be handled. Since the UI is executed after API, only the latest html report(UI) is being stored in GitHub runs. Either we need to add API test as separate job (but this will increase the GitHub runner image setup time) Or we need to handle the report generation directory so that both the html reports for UI & API are uploaded.
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)