TRUNK | REST API | FHIR API | SONAQUBE DASHBOARD |
---|---|---|---|
Install & Upgrade Tests |
---|
2.x RefApp Workflow Tests |
---|
All Chrome Tests |
2.x RefApp Feature-Specific Tests* |
------------- |
Legacy Selenium Chrome |
Legacy UI |
* Detailed list of Legacy Selenium Tests here.
3.x RefApp Workflow Tests |
---|
3.x Demo Build |
OpenMRS Dictionary Manager |
---|
(Create, Edit, Copy, Version and Release) |
Loading into EMR ____ Coming soon |
OCL Module (Subscription Module) |
---|
OpenMRS BDD QA framework, Currently tracking;
mvn clean install -DskipTests=true
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
cd qaframework-bdd-tests
npm run refappSelenium
npm run simpleCoreInstall
npm run advancedCoreInstall
npm run postgresCoreInstall
npm run testingCoreInstall
npm run coreUpgrade
- 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
You don’t need to set up an OpenMRS instance since we use a cloud instance for the test backend.
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.
.
├── 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
-
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
-
- 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:
[![<workflow name>](<link-to-the-workflow>/badge.svg)](<link-to-the-workflow>)
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.
- For the platform, manually run both Installation and upgrade workflows again.
- Check all relevant builds to the release above to be sure they pass