Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

QAFramework is an OpenMRS’ behaviour driven development (BDD) quality assurance framework. 

...

git clone git@github.com:openmrs/openmrs-contrib-qaframework.git

Install project dependencies

 cd openmrs-contrib-qaframework

  • mvn clean install -DskipTests=true  to Install dependencies 

In order to test within a real desktop browser, you will need a webdriver to connect to your browser (either firefox or chrome).

...

How to run locally tests for  2.x Reference Application

For  BDD workflow tests

 i.  Ensure to have done step one in Setup wizard above 

  cd openmrs-contrib-qaframework

 ii. Navigate into qaframework-bdd-tests module.

     cd qaframework-bdd-tests

 iii. See the list of test workflows  present in the module by running the command:

     npm run

 iv.Trigger any test workflow by running the command:

     npm run workflowName

     For example a workflow whose name is refapp2ClinicalVisit can be triggered by running the command:

     npm run refapp2ClinicalVisit

     Note: If you want to watch the test via UI then set headless property value within test.properties file to false.


For selenium legacy tests

i. Ensure to have done step one in Setup wizard above 

  cd openmrs-contrib-qaframework

ii. Navigate into qaframework-legacy-tests module

  cd qaframework-legacy-tests

iii. Trigger the selenium legacy tests by running the command:   

    mvn clean install -DskipTests=false

   Note: Running the tests using the default online instance takes more time compared with spinning from a local

   instance. So you can change the webUrl property value within test.properties file to point to your local server url.

...

 i. Ensure to have done step one in Setup wizard above 

    cd openmrs-contrib-qaframework

ii.  Navigate into qaframework-bdd-tests module

  cd openmrs-contrib-qaframework

iii. Install the dependencies required to run the tests by running the command:

    npm install

iv.Trigger 3.x tests by running the command:

    npm cypress open

    Note: See a list of registered commands that can trigger specific test workflow by running the command:

    npm run

    Example npm run refapp3Login triggers the login workflow

How to Update Node version

Check the current version you have:

 npm -v

Clear npm cache

  sudo npm cache clean -f

Install or upgrade npm globally specifying syntax n , n means the version number of npm
  sudo npm install -g n

or you can simply use 

  sudo n stable : 
To install the stable version of npm


...