QA Dashboard: Project Status


Platform (core)

TRUNK REST API FHIR API
Build Status Build Status Build Status
Install & Upgrade Tests
Platform Simple Installation
Platform Advanced Installation
Platform Postgres Installation
Platform Upgrade

Reference Application

2.x RefApp Workflow Tests
All Chrome Tests Build Status
All Firefox Tests
RefApp 2.x Clinical Visit
RefApp 2.x Vitals And Triaging
RefApp 2.x Inpatient
RefApp 2.x Registration
RefApp 2.x User Account
RefApp 2.x Find Patient
2.x RefApp Feature-Specific Tests*
Legacy Selenium Chrome Build Status
Legacy Selenium Firefox
Legacy UI Build Status
* Detailed list of Legacy Selenium Tests here.
3.x RefApp Workflow Tests
RefApp 3.x Login
RefApp 3.x Search & Registration
RefApp 3.x User settings
RefApp 3.x Clinical Visit

Concept Management Tools

OpenMRS Dictionary Manager
Dictionary Manager
Basic Dictionary Management ____
Loading into EMR ____
Organization Management ____
OCL Module (Subscription Module)
OCL Module Build Status

openmrs-contrib-qaframework

OpenMRS BDD QA framework, Currently tracking;

Installing dependencies

  • mvn clean install -DskipTests=true

Configuration

Set Your test configurations in src/test/resources/org/openmrs/uitestframework/test.properties. MySQL password should be the same for initialSetupTests as openmrs password

Running test projects

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

  1. Clone the project
     git clone git@github.com:openmrs/openmrs-contrib-qaframework.git
     cd openmrs-contrib-qaframework
    
  2. 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.

Running tests

There are two ways of running tests:

  1. Running with cypress runner Open the Cypress runner with

    cypress open
    

    and pick a test from the GUI.

  2. Running in command line

    Run the desired test using npm run, e.g.

    npm run refapp3Login
    

    See the scripts section of package.json.

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

  1. Create a new directory with your feature file under /src/test/resources/features/refapp-3.x/.

    The name of the directory should be <sequence>-<name>.

    Example feature file

  2. 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

  3. 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

  1. Create a new GitHub workflow file under .github/workflows/ directory. An example workflow can be found here.
  2. 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>)

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