QA Dashboard: Project Status
Platform (core)
TRUNK | REST API | FHIR API | SONAQUBE DASHBOARD |
---|---|---|---|
Install & Upgrade Tests |
---|
Reference Application
2.x RefApp Workflow Tests |
---|
All Chrome Tests |
2.x RefApp Feature-Specific Tests* |
---|
Legacy Selenium Chrome |
Legacy UI |
here.
* Detailed list of Legacy Selenium Tests3.x RefApp Workflow Tests |
---|
3.x Demo Build |
Concept Management Tools
OpenMRS Dictionary Manager |
---|
Loading into EMR ____ Coming soon |
OCL Module (Subscription Module) |
---|
openmrs-contrib-qaframework
OpenMRS BDD QA framework, Currently tracking;
Installing dependencies
mvn clean install -DskipTests=true
Configuration
Set your test configurations in qaframework-bdd-tests/src/test/resources/org/openmrs/uitestframework/test.properties
.
MySQL password should be the same for initialSetupTests as openmrs password
Running test projects
Navigate into bdd tests module
cd qaframework-bdd-tests
Running Ref app selenium tests
npm run refappSelenium
Running Platform Simple Installation test
npm run simpleCoreInstall
Running Platform Advanced Installation test
npm run advancedCoreInstall
Running Platform postgres Installation test
npm run postgresCoreInstall
Running Platform Testing Installation test
npm run testingCoreInstall
Running Platform Upgrade test
npm run coreUpgrade
RefApp 3.x E2E tests
Setting up the project
- Clone the project
git clone git@github.com:openmrs/openmrs-contrib-qaframework.git cd openmrs-contrib-qaframework
- Navigate into bdd tests module
cd qaframework-bdd-tests
- Install the dependencies
npm install
Setup up the local instance.
-
Clone the repository and navigate
git clone -b 3.x git@github.com:openmrs/openmrs-distro-referenceapplication.git cd openmrs-distro-referenceapplication
-
Package the distribution and prepare the run
mvn clean package
- If the build fails, try deleting existing containers
cd run/docker docker compose down -v
- Then package the distribution again
- Run the app
docker-compose up
Running tests`
There are two ways of running tests:
-
Running with cypress runner Open the Cypress runner with
cypress open
and pick a test from the GUI.
-
Running in command line
Run the desired test using
npm run
, e.g.npm run refapp3Login
See the
scripts
section of package.json.
Tests might be timed out on slow internet connections. In that case, try increasing the defaultCommandTimeout
setting in the 'cypress.json' file.
File structure
.
├── cypress
│ ├── fixtures // Test fixtures (e.g. attachments)
│ │ └── test_image.jpeg
│ ├── integration
│ │ └── cucumber
│ │ └── step_definitions
│ │ ├── refapp-2.x
│ │ │ └── login.js
│ │ └── refapp-3.x // Cypress tests for the refapp 3.x
│ │ ├── 01-login
│ │ │ └── login.js
│ │ ...
│ ├── plugins
│ │ └── index.js
│ ├── support
│ │ ├── commands.js // Custom commands for Cypress
│ │ └── index.js
│ ├── videos // Screen recordings (set "video": true in cypress.json)
│ └── tsconfig.json
├── src
│ └── test
│ ├── java
│ └── resources
│ ├── features
│ │ ├── platform
│ │ ├── refapp-2.x
│ │ └── refapp-3.x // Cucumber feature files for the refapp 3.x
│ │ ├── 01-login
│ │ │ └── login.feature
│ │ ...
├── target
├── README.md
├── cypress.json // Cypress configuration file
├── package.json
├── pom.xml
Writing a new test
-
Create a new directory with your feature file under
/qaframework-bdd-tests/src/test/resources/features/refapp-3.x/
.The name of the directory should be
<sequence>-<name>
. -
Create a new directory with the same name under
cypress/integration/cucumber/step_definitions/refapp-3.x/
to store the step definition file. See the cypress-cucumber-preprocessor docs -
Run the test using either:
-
Command line:
cypress run --spec <path-to-feature-file>
(You can simplify the command by adding it to the npm scripts section. See this example.)
-
Cypress runner:
cypress open
and choose the test
-
Creating a GitHub workflow
- Create a new GitHub workflow file under
.github/workflows/
directory. An example workflow can be found here. - Add the workflow badge to the readme file under 3.x RefApp section. It should take the following format:
[](<link-to-the-workflow>)
Environment variables
The environment variables are stored in the cypress.json
file. The variables can be accessed with Cypress.env()
; e.g.,
Cypress.env('API_BASE_URL');
See the Cypress docs.
Before Releasing
- For the platform, manually run both Installation and upgrade workflows again.
- Check all relevant builds to the release above to be sure they pass
Wiki
-
We use JIRA to track issues and monitor project development. Refer to this link to view all issues and project summary: QA Kanban board JIRA.
-
To get started contributing, start working on introductory issues in JIRA and check out OpenMRS Pull Request Tips.
-
There is a detailed guide for setting up the OpenMRS QA Framework locally, checkout the guide here.