Skip to content

kbetty/openmrs-contrib-qaframework

 
 

Repository files navigation

QA Dashboard: Project Status


Platform (core)

TRUNK REST API FHIR API SONAQUBE DASHBOARD
Build Status 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 Patient Condition
RefApp 2.x Vitals And Triaging
RefApp 2.x Inpatient
RefApp 2.x Registration
RefApp 2.x Roles And Privileges
RefApp 2.x Find Patient
RefApp 2.x Person
RefApp 2.x Patient Demographics
RefApp 2.x User Account
RefApp 2.x Patient Record
RefApp 2.x Report
RefApp 2.x Phone Number Validation
RefApp 2.x Provider
RefApp 2.x Form
RefApp 2.x Patient Allergies
RefApp 2.x Visit Type
RefApp 2.x Patient Visit
RefApp 2.x Login
RefApp 2.x Open Concept Lab
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
3.x Demo Build Build Status
RefApp 3.x Login
RefApp 3.x Patient Registration
RefApp 3.x User settings
RefApp 3.x Clinical Visit
RefApp 3.x Vitals And Triage
RefApp 3.x Patient Search

Concept Management Tools

OpenMRS Dictionary Manager
Dictionary Manager
Basic Dictionary Management (Create, Edit, Copy, Version and Release)
Organization Management
Loading into EMR ____ Coming soon
OCL Module (Subscription Module)
OCL 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

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

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

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

    Example of a 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

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 86.2%
  • JavaScript 7.0%
  • Gherkin 6.8%