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. 

...

QAFramework should be followed when building qaframework

...




1.

...

 Run QAFramework

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

...

How to run locally tests for  2.x Reference Application

For  BDD workflow tests

 i.  Ensure to have followed the respective first two steps 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

 iii 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 followed  the first done step one in the Setup wizard above wizard above 

    cd openmrs-distro-referenceapplication/ui-contrib-qaframework

ii. Navigate into qaframework-legacy-tests module

  cd qaframework-legacy-tests

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

    mvn clean install -DskipTests=false

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

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


How to run locally tests for  3.x Reference Application

 i. Ensure to have followed the respective first done step one in Setup wizard above  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

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


...