847: Demo data

Test Case #: 847

Test Case Name: Demo data

System: OpenLMIS

Subsystem: Requisition

Test case designed by: Anna Czyrko

Design Date: 06.09.2016

Short description

Acceptance criteria

  • All reference objects should have at least one dummy instance present and accessible via API or UI (e.g. user, facility, product, program, etc.)
  • Dummy instances should be present to verify all major forks in business logic that need to be reviewed (for example a requisition in 'initiated', 'submitted', 'authorized' stages should be created as part of the user stories related to those stories)
  • Associations between dummy data should be populated (for example, a requisition should hold the external keys for a user, facility, program, etc.)
  • Moving forward, appropriate dummy data should be created for all stories that require dummy data to demo functionality data
  • A means to persist dummy data for future re-use (upload file format/SQL script/set of RESTful API calls/etc.) with specific focus on making it easy for non-devs to maintain/modify/create their own demo data
  • Dummy data should provide a basis for more complete seed data in the future but does not need to be at the same level of rigor or completeness

                                                                                                                                                   

Pre – conditions:

1. Fork/clone repository from GitHub: git clone https://github.com/OpenLMIS/openlmis-requisition.git


2. Add an environment file called .env to the root folder of the project, with the required project settings and credentials. 

cd openlmis-requisition
curl -LO https://raw.githubusercontent.com/OpenLMIS/openlmis-config/master/.env

3. Enter in Terminal docker-compose run --service-ports requisition, gadle clean and gradle build.
                                                                                                                                                                                                                              



Step

Action

Expected system response

Comment

1

 In terminal enter gradle demoDataSeed


2

In demo-data folder we can see sql file


3In Terminal enter gradle bootRun.

4 In new Terminal enter docker exec -i openlmisrequisition_db_1 psql -Upostgres open_lmis < demo-data/input.sql



Post – conditions:

                                                                                                                   

OpenLMIS: the global initiative for powerful LMIS software